WSF
ParseUtil.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2016 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef PARSEUTIL_HPP
13#define PARSEUTIL_HPP
14
15#include "ViExport.hpp"
16class WsfParseNode;
17#include "WsfParseTypePath.hpp"
18
19namespace wizard
20{
21namespace ParseUtil
22{
23
24bool VI_EXPORT FindReferenceType(WsfParseNode* aNodePtr, WsfParseTypePath& aTypeKey, bool& aNested);
25
26bool VI_EXPORT FindTypeNode(WsfParseNode* aNodePtr, WsfParseNode*& aTypeNodePtr);
27
31std::vector<std::string> VI_EXPORT GetFlagStringList(const WsfParseNode* aNode) noexcept;
32
33namespace Context
34{
35
44
68{
69 BlockContext() = default;
70 BlockContext(Type aContextType)
71 : mType(std::move(aContextType))
72 {
73 }
74
80 static BlockContext GetContext(WsfParseNode* aNode) noexcept;
81
84};
85
88{
89 MoverContext() = default;
90 MoverContext(Type aContextType)
91 : BlockContext(std::move(aContextType))
92 {
93 }
94
96 static MoverContext GetContext(WsfParseNode* aNode) noexcept;
97};
98
99} // namespace Context
100} // namespace ParseUtil
101} // namespace wizard
102
103#endif
#define VI_EXPORT
Definition ViExport.hpp:38
std::vector< UtStringRef > WsfParseTypePath
Definition WsfParseTypePath.hpp:21
Definition WsfParseNode.hpp:61
Template specialization for wsf::comm::Address. Allows usage of Address in std::unordered_map/set.
Definition WsfCommAddress.hpp:185
Definition ParseUtil.hpp:34
Type
Represents the context type.
Definition ParseUtil.hpp:38
@ Implicit
Definition ParseUtil.hpp:41
@ NotApplicable
Context does not apply to this block.
Definition ParseUtil.hpp:39
@ Explicit
This block has explicit context.
Definition ParseUtil.hpp:40
Definition ParseUtil.hpp:22
bool VI_EXPORT FindTypeNode(WsfParseNode *aNodePtr, WsfParseNode *&aTypeNodePtr)
Definition ParseUtil.cpp:75
bool VI_EXPORT FindReferenceType(WsfParseNode *aNodePtr, WsfParseTypePath &aTypeKey, bool &aNested)
Definition ParseUtil.cpp:25
std::vector< std::string > VI_EXPORT GetFlagStringList(const WsfParseNode *aNode) noexcept
Definition ParseUtil.cpp:90
Definition Runner.hpp:22
Definition ParseUtil.hpp:68
BlockContext(Type aContextType)
Definition ParseUtil.hpp:70
const Type mType
The type of context.
Definition ParseUtil.hpp:83
Context (or scope) for a block defining a mover.
Definition ParseUtil.hpp:88
MoverContext(Type aContextType)
Definition ParseUtil.hpp:90
Copyrights Multiple, All Rights Reserved