WSF
wizard::ParseUtil::Context::BlockContext Struct Reference

#include <ParseUtil.hpp>

Inheritance diagram for wizard::ParseUtil::Context::BlockContext:

Public Member Functions

 BlockContext ()=default
 BlockContext (Type aContextType)

Static Public Member Functions

static BlockContext GetContext (WsfParseNode *aNode) noexcept

Public Attributes

const Type mType {Type::NotApplicable}
 The type of context.

Detailed Description

Context (or scope) for a generic block of AFSIM input

AFSIM input context
Every command in AFSIM input has context (or scope). The context of a command depends on where it is used. For the most part, the context of AFSIM input commands is explicit. For example,
platform
position 0n 0e
end_platform
position has explicit context inside the platform block. However, some commands have implicit context, meaning that they can be defined outside of the explicit context. For example,
platform
route
position 0n 0e
end_route
end_platform
route has implicit context within a mover block, since a route is defined on the mover, not the platform.

Constructor & Destructor Documentation

◆ BlockContext() [1/2]

wizard::ParseUtil::Context::BlockContext::BlockContext ( )
default

◆ BlockContext() [2/2]

wizard::ParseUtil::Context::BlockContext::BlockContext ( Type aContextType)
inline

References mType.

Member Function Documentation

◆ GetContext()

wizard::ParseUtil::Context::BlockContext wizard::ParseUtil::Context::BlockContext::GetContext ( WsfParseNode * aNode)
staticnoexcept

Determines the context of a WsfParseNode

Parameters
aNodeis the node of which to determine the block context
Precondition
The WsfParseNode needs the cBLOCK_NODE flag set
Note
Since implicit block context depends on the AFSIM input block, we cannot determine implicit context here.
There are multiple ways of finding the block context, but the easiest way is to start from a "block_node".

References BlockContext(), WsfParseNode::cBLOCK_END, WsfParseNode::cBLOCK_NODE, WsfParseNode::cBLOCK_START, and wizard::ParseUtil::Context::Explicit.

Member Data Documentation

◆ mType

const Type wizard::ParseUtil::Context::BlockContext::mType {Type::NotApplicable}

The type of context.

Referenced by BlockContext().


The documentation for this struct was generated from the following files:
Copyrights Multiple, All Rights Reserved