WSF
wizard::ProxyUtil Namespace Reference

Functions

WsfParseNodeFindBlockStartNodeFromEntry (const WsfPProxyIndexEntry &aEntry) noexcept
WsfParseNodeFindBlockEndNodeFromEntry (const WsfPProxyIndexEntry &aEntry) noexcept
void FindBlockStartLocations (const std::vector< WsfPProxyIndexEntry > &aEntries, std::vector< UtTextDocumentRange > &aLocations) noexcept
void FindBlockEndLocations (const std::vector< WsfPProxyIndexEntry > &aEntries, std::vector< UtTextDocumentRange > &aLocations) noexcept
void FindBlockLocations (const std::vector< WsfPProxyIndexEntry > &aEntries, std::vector< UtTextDocumentRange > &aLocations) noexcept
WsfPM_Zone FindZoneNodeByName (const std::string &aZoneName, const std::string &aParentPlatName) noexcept
void InvalidateInput (const WsfPProxyNode &aProxyNode) noexcept

Function Documentation

◆ FindBlockEndLocations()

void VI_EXPORT wizard::ProxyUtil::FindBlockEndLocations ( const std::vector< WsfPProxyIndexEntry > & aEntries,
std::vector< UtTextDocumentRange > & aLocations )
noexcept

Finds locations in the parse tree representing the end of an corresponding to entries in the proxy index tree

Parameters
aEntriesis the list of entries from the proxy index tree
aLocationsis the list of locations in the parse tree

References FindBlockEndNodeFromEntry(), and WsfParseNode::SubtreeRange().

◆ FindBlockEndNodeFromEntry()

WsfParseNode VI_EXPORT * wizard::ProxyUtil::FindBlockEndNodeFromEntry ( const WsfPProxyIndexEntry & aEntry)
noexcept
Finding the block_end node
This is a note about finding the block_end node from one of the following node types:
  • type_name
  • type_reference
  • load_type
  • lazy_type_name
  • lazy_type_reference
  • block_start
  • block_end Usually, these nodes are to the left of the block_end node when in an EXPLICIT block context. Also, sometimes the nodes do not precede a block_end node. In that case, this returns the right-most sibling of the node contained in aEntry.
See also
ParseUtil::Context::BlockContext

Given a WsfPProxyIndexEntry, find the WsfParseNode representing the end of the respective AFSIM input block

Parameters
aEntryis the proxy entry
Returns
the parse node representing the end of the respective AFSIM input block

References WsfParseNode::cBLOCK_END, WsfParseNode::cBLOCK_NODE, WsfParseNode::cBLOCK_START, WsfParseNode::cLAZY_TYPE_MASK, WsfParseNode::cLOAD_TYPE_NODE, WsfParseNode::cTYPE_MASK, WsfParseNode::GetFlags(), and WsfParseNode::Right().

Referenced by FindBlockEndLocations(), FindBlockLocations(), and InvalidateInput().

◆ FindBlockLocations()

void VI_EXPORT wizard::ProxyUtil::FindBlockLocations ( const std::vector< WsfPProxyIndexEntry > & aEntries,
std::vector< UtTextDocumentRange > & aLocations )
noexcept

Finds locations in the parse tree representing an AFSIM input block corresponding to entries in the proxy index tree

Parameters
aEntriesis the list of entries from the proxy index tree
aLocationsis the list of locations in the parse tree

References FindBlockEndNodeFromEntry(), FindBlockStartNodeFromEntry(), and WsfParseNode::SubtreeRange().

Referenced by wizard::ParseResultsProxyData::FindModificationLocations().

◆ FindBlockStartLocations()

void VI_EXPORT wizard::ProxyUtil::FindBlockStartLocations ( const std::vector< WsfPProxyIndexEntry > & aEntries,
std::vector< UtTextDocumentRange > & aLocations )
noexcept

Finds locations in the parse tree representing the start of an corresponding to entries in the proxy index tree

Parameters
aEntriesis the list of entries from the proxy index tree
aLocationsis the list of locations in the parse tree

References wizard::ParseUtil::Context::Explicit, FindBlockStartNodeFromEntry(), wizard::ParseUtil::Context::MoverContext::GetContext(), wizard::ParseUtil::Context::Implicit, wizard::ParseUtil::Context::NotApplicable, and WsfParseNode::SubtreeRange().

Referenced by wizard::ParseResultsProxyData::FindDefinitionStartLocations().

◆ FindBlockStartNodeFromEntry()

WsfParseNode VI_EXPORT * wizard::ProxyUtil::FindBlockStartNodeFromEntry ( const WsfPProxyIndexEntry & aEntry)
noexcept
Finding the block_start node
This is a note about finding the block_start node from one of the following node types:
  • type_name
  • type_reference
  • load_type
  • lazy_type_name
  • lazy_type_reference
  • block_node
  • block_end Usually, these nodes are to the right of the block_start node when in an EXPLICIT block context. However, sometimes these nodes are below the block_start node when in an IMPLICIT block context. Also, sometimes the nodes do not succeed a block_start node. In that case, this returns the left-most sibling of the node contained in aEntry.
See also
ParseUtil::Context::BlockContext

Given a WsfPProxyIndexEntry, find the WsfParseNode representing the start of the respective AFSIM input block

Parameters
aEntryis the proxy entry
Returns
the parse node representing the start of the respective AFSIM input block

References WsfParseNode::cBLOCK_END, WsfParseNode::cBLOCK_NODE, WsfParseNode::cBLOCK_START, WsfParseNode::cLAZY_TYPE_MASK, WsfParseNode::cLOAD_TYPE_NODE, WsfParseNode::cTYPE_MASK, WsfParseNode::Down(), WsfParseNode::GetFlags(), WsfParseNode::Left(), and WsfParseNode::Right().

Referenced by FindBlockLocations(), FindBlockStartLocations(), and InvalidateInput().

◆ FindZoneNodeByName()

WsfPM_Zone VI_EXPORT wizard::ProxyUtil::FindZoneNodeByName ( const std::string & aZoneName,
const std::string & aParentPlatName = "Global Zones" )
noexcept

Finds the definition of a zone or zone set given its name.

Parameters
aZoneNameis the name of the zone to look up
aParentPlatNameis the name of a parent platform to check in addition to the global zone namespace

References WsfPM_ObjectMap::Find(), wizard::ProxyWatcher::GetActiveProxy(), WsfPProxyNode::IsValid(), WsfPM_Root::platforms(), WsfPM_Platform::Zone(), and WsfPM_Root::zones().

◆ InvalidateInput()

void VI_EXPORT wizard::ProxyUtil::InvalidateInput ( const WsfPProxyNode & aProxyNode)
noexcept

Marks the range pointed to by a proxy node as invalid

Parameters
aProxyNodeis the proxy node whose range is to become invalid
Precondition
the range is syntax-highlighted as valid
Postcondition
the range is syntax-highlighted as an error (red text)

References WsfParseNode::cERROR_INCOMPLETE, FindBlockEndNodeFromEntry(), FindBlockStartNodeFromEntry(), wizard::ProjectWorkspace::GotoFile(), wizard::ProjectWorkspace::Instance(), WsfPProxyIndexNode::mEntries, WsfParseNode::mFlags, WsfParseNode::Next(), WsfParseNode::SubtreeRange(), and wizard::Editor::UpdateStyle().

Copyrights Multiple, All Rights Reserved