WSF
WsfParseRule.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 2003-2015 The Boeing 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// Updated by Infoscitex, a DCS Company.
13// ****************************************************************************
14
15#ifndef WSFPARSERULE_HPP
16#define WSFPARSERULE_HPP
17
18#include "wsf_parser_export.h"
19
20#include <map>
21#include <string>
22#include <vector>
23
24#include "UtReferenceCount.hpp"
25#include "UtTextDocument.hpp"
26#include "WsfParseAction.hpp"
27#include "WsfParseGrammar.hpp"
28
29class WsfParseAction;
30class WsfParseActionSub;
33class WsfParseLiteral;
35class WsfParseNode;
37class WsfParseRule;
42class WsfParseStruct;
43class WsfParser;
44
45namespace std
46{
47void swap(WsfParseRule& aLhs, WsfParseRule& aRhs);
48void swap(WsfParseAlternate& aLhs, WsfParseAlternate& aRhs);
49void swap(WsfParseAttribute& aLhs, WsfParseAttribute& aRhs);
50void swap(WsfParseNamedRule& aLhs, WsfParseNamedRule& aRhs);
51void swap(WsfParseRuleReference& aLhs, WsfParseRuleReference& aRhs);
52void swap(WsfParseSequence& aLhs, WsfParseSequence& aRhs);
53void swap(WsfParseStruct& aLhs, WsfParseStruct& aRhs);
55} // namespace std
56
57class WSF_PARSER_EXPORT WsfParseValueType
58{
59public:
67
69 : mKind(cVALUE)
70 , mStructPtr(nullptr)
71 , mValuePtr(nullptr)
72 , mTemplateType(nullptr)
73 {
74 }
77 static WsfParseValueType* List(WsfParseValueType* aTemplatedType)
78 {
80 v->mTemplateType = aTemplatedType;
81 v->mKind = cLIST;
82 v->mTypeName = "List/";
83 v->mTypeName += aTemplatedType->GetTypeName();
84 return v;
85 }
87 {
89 v->mTemplateType = aTemplatedType;
90 v->mKind = cOBJECT_MAP;
91 v->mTypeName = "ObjectMap/";
92 v->mTypeName += aTemplatedType->GetTypeName();
93 return v;
94 }
95
99 static bool IsValidListTemplate(const std::string& aTypeName) noexcept;
100
104 static bool IsValidObjectMapTemplate(const std::string& aTypeName) noexcept;
105
109 static bool IsValidTemplate(const std::string& aTypeName) noexcept;
110
113 static std::string GetContainedTypeName(const std::string& aTypeName) noexcept;
114
115 std::string& GetTypeName() { return mTypeName; }
116
117 WsfParseNamedRule* GetTypeRule();
118
120 std::string mTypeName;
124 // std::vector<WsfParseValue*> mValueRules;
125};
126
130class WSF_PARSER_EXPORT WsfParseRule
131{
132public:
154
156 {
157 // Indicates the Resolve() function should be called at the completion of the sequence
159 // Indicates the reader makes no change that can't be undone (disallow backtracking)
161 // Indicates this reader always results in matching in a single token
163 // Indicates the rule simply passes processing to a child ( bypassing creating another node )
164 // If this is set, the created node should point to this reader, and the GetPassthrough() method should be implemented
166 // Indicates the rule is a '(value xyz)', or a neste rule in a value rule which should
167 // be treated as a value rule
169 };
170
172 WsfParseRule(WsfParseRuleMemory& aMem, RuleType aType);
173 virtual ~WsfParseRule() = default;
174 WsfParseRule(const WsfParseRule&) = default; // copy constructor
175
184
186 RuleType Type() const { return mRuleType; }
187
193 virtual bool Read(WsfParser& aParser, WsfParseNode*& aNode) = 0;
194
197 virtual bool ReadRange(WsfParser& aParser, UtTextDocumentRange& aRange, WsfParseNode*& aNode, bool aCreateNode)
198 {
199 return false;
200 }
201
204 virtual void Undo(WsfParser& aParser) {}
205
208 virtual void Resolve(WsfParser& aParser, WsfParseNode* aNodePtr) {}
209
210 virtual void Initialize(int aSequence);
211
212 // These functions allow walking the rule structure without inspecting each rule type
213 virtual std::vector<WsfParseRule*> GetSequence() { return std::vector<WsfParseRule*>(); }
214 virtual std::vector<WsfParseRule*> GetAlternates() { return std::vector<WsfParseRule*>(); }
215 virtual WsfParseRuleDictionary* GetNestedRules() { return nullptr; }
216 virtual WsfParseNamedRule* GetContext() const { return nullptr; }
217 virtual WsfParseRule* GetPassthrough() { return nullptr; }
218
219 virtual std::string GetRuleDescription() { return "<...>"; }
220
222 virtual WsfParseValueType* GetType() { return nullptr; }
223
224 WsfParseStruct* GetContainingStruct() const;
225 WsfParseStruct* GetStruct();
226
227 WsfParseNamedRule* GetEntryType();
228 WsfParseNamedRule* GetInputType();
229 WsfParseNamedRule* GetOutputType();
230
231 WsfParseNamedRule* GetBestContext();
232 WsfParseNamedRule* GetVarContext();
233 bool IsNamedRule() const
234 {
235 switch (mRuleType)
236 {
237 case cNAMED_RULE:
238 case cVALUE:
239 case cSTRUCT:
240 return true;
241 default:
242 return false;
243 }
244 }
245
246 int GetReaderFlags() const { return mReaderFlags; }
247
251
256
257protected:
259};
260
261// Keeps a list of parse rules for deletion later
262class WSF_PARSER_EXPORT WsfParseRuleMemory
263{
264public:
267 WsfParseRuleMemory(const WsfParseRuleMemory&) = default; // copy constructor
268
269 void RuleAdded(WsfParseRule* aRulePtr) { mRules.push_back(aRulePtr); }
270
271 std::vector<WsfParseValueType*> CollectTypes();
272 std::vector<WsfParseRule*> mRules;
273};
274
275namespace std
276{
277inline void swap(WsfParseRule& aLhs, WsfParseRule& aRhs)
278{
279 aLhs.Swap(aRhs);
280}
281} // namespace std
282
283class WSF_PARSER_EXPORT WsfParsePassthrough : public WsfParseRule
284{
285public:
297
298 bool Read(WsfParser& aParser, WsfParseNode*& aNode) override;
299 bool ReadRange(WsfParser& aParser, UtTextDocumentRange& aRange, WsfParseNode*& aNode, bool aCreateNode) override;
301 void ProcessNode(WsfParseNode& aNode);
302 void SetPassthroughRule(WsfParseRule* aRulePtr);
303 std::vector<WsfParseRule*> GetSequence() override { return std::vector<WsfParseRule*>(1, mSubordinateRulePtr); }
305};
306
308class WSF_PARSER_EXPORT WsfParseLiteral : public WsfParseRule
309{
310public:
312 bool Read(WsfParser& aParser, WsfParseNode*& aNode) override;
313 bool ReadRange(WsfParser& aParser, UtTextDocumentRange& aRange, WsfParseNode*& aNode, bool aCreateNode) override;
314
315 bool MatchesString(const std::string& aString);
316
317 std::string GetRuleDescription() override { return mText; }
318
321 std::string mText;
322 unsigned int mNodeFlags;
323};
324
325namespace std
326{
327inline void swap(WsfParseLiteral& aLhs, WsfParseLiteral& aRhs)
328{
329 swap((WsfParseRule&)aLhs, (WsfParseRule&)aRhs);
331 swap(aLhs.mIsTerminator, aRhs.mIsTerminator);
332 swap(aLhs.mText, aRhs.mText);
333}
334} // namespace std
335class WsfParseValue;
336
337class WSF_PARSER_EXPORT WsfParseRuleDictionary
338{
339public:
341 WsfParseNamedRule* Find(const std::string& aRule);
342 void Add(WsfParseNamedRule* aRule);
343 using NameRuleMap = std::map<std::string, WsfParseNamedRule*>;
345};
346
347
348// A rule definition
349class WSF_PARSER_EXPORT WsfParseNamedRule : public WsfParseRule
350{
351public:
353 WsfParseNamedRule(WsfParseRuleMemory& aMem, const std::string& aName, WsfParseRule* aRulePtr);
354 ~WsfParseNamedRule() override;
355
357 void Initialize(int aSequence) override;
358
359 WsfParseStruct* FindStruct(const std::string& aRuleName);
360
361 WsfParseNamedRule* Find(const std::string& aRuleName);
362
363 // Find a nested named rule. Do not look on parent
364 WsfParseNamedRule* FindImmediate(const std::string& aRuleName);
365
366 WsfParseValue* FindValue(const std::string& aTypeName);
367
368 bool HasNestedRules() const { return mNestedRules != nullptr; }
369
371
372 WsfParseRuleDictionary* GetNested();
373
374 bool Read(WsfParser& aParser, WsfParseNode*& aNode) override;
375
376 bool ReadRange(WsfParser& aParser, UtTextDocumentRange& aRange, WsfParseNode*& aNode, bool aCreateNode) override;
377
378
379 void SetDefinition(WsfParseRule* aRulePtr);
380
381 std::string GetFullName() const;
382
385 std::vector<WsfParseRule*> GetSequence() override { return std::vector<WsfParseRule*>(1, mSubordinateRulePtr); }
386 WsfParseNamedRule* GetContext() const override { return mContextParent; }
388 std::string GetRuleDescription() override { return "<" + GetFullName() + ">"; }
389 WsfParseValue* GetRuleValue();
390 bool IsPartValueRule() { return 0 != (mReaderFlags & cIS_VALUE_RULE); }
391
404
405 // WsfParseNamedRule* mParentRule;
408 std::string mName;
409 std::string mInputTypeName;
411 std::string mOutputTypeName;
413
414 // List of rules which directly link to this rule
415 std::vector<WsfParseRule*> mReferencingRules;
416
417protected:
419};
420
421namespace std
422{
423inline void swap(WsfParseNamedRule& aLhs, WsfParseNamedRule& aRhs)
424{
425 aLhs.Swap(aRhs);
426}
427} // namespace std
428
429// A reference to a rule
430class WSF_PARSER_EXPORT WsfParseRuleReference : public WsfParseRule
431{
432public:
439 ~WsfParseRuleReference() override;
440
441 bool Read(WsfParser& aParser, WsfParseNode*& aNode) override;
442 bool ReadRange(WsfParser& aParser, UtTextDocumentRange& aRange, WsfParseNode*& aNode, bool aCreateNode) override;
444 {
445 if (aRulePtr)
446 {
447 mUserId = aRulePtr->mUserId;
448 }
449 SetSubordinateRule(aRulePtr);
450 }
451 std::vector<WsfParseRule*> GetSequence() override { return std::vector<WsfParseRule*>(1, GetSubordinateRule()); }
454 std::string GetRuleDescription() override { return "<" + mRuleName + ">"; }
455
456 std::string mRuleName;
457 // This is a reference, not an ownership
458 // WsfParseNamedRule* mRulePtr;
459};
460
462class WSF_PARSER_EXPORT WsfParseAttribute
463{
464public:
465 enum Flags
466 {
468 };
469
471 : mFlags(0)
472 , mName()
473 , mType()
474 , mDefault()
475 , mTypePtr(nullptr)
476 , mHasDefaultValue(false)
477 , mIsPointer(false)
478 {
479 }
480
481 unsigned int mFlags;
482 std::string mName;
483 std::string mType;
484 std::string mDefault;
488};
489
490
491class WSF_PARSER_EXPORT WsfParseValue : public WsfParseNamedRule
492{
493public:
494 WsfParseValue(WsfParseRuleMemory& aMem, const std::string& aName);
495 void Initialize(int aSequence) override;
496 ~WsfParseValue() override = default;
497 WsfParseValueType* GetType() override;
498
501};
502
503
504class WSF_PARSER_EXPORT WsfParseEnumerationValues
505{
506public:
507 using NameValue = std::pair<std::string, int>;
508 std::vector<NameValue> mNameValues;
509};
510
511
512class WSF_PARSER_EXPORT WsfParseEnumeration : public WsfParseValue
513{
514public:
515 WsfParseEnumeration(WsfParseRuleMemory& aMem, const std::string& aName)
516 : WsfParseValue(aMem, aName)
517 , mValues()
518 {
520 mIsEnumeration = true;
521 }
523};
524
525
526class WSF_PARSER_EXPORT WsfParseStruct : public WsfParseNamedRule
527{
528public:
530 {
532 std::string mTypeName;
533 std::string mVariableName;
534 };
535
536 WsfParseStruct(WsfParseRuleMemory& aMem, const std::string& aRuleName);
537 ~WsfParseStruct() override;
538 WsfParseAttribute* FindAttribute(const std::string& aName);
539 size_t FindAttributeIndex(const std::string& aName);
540 void Initialize(int aSequence) override;
541
543 {
544 if (aIndex >= mBaseAttributeCount)
545 {
546 return mAttributes[aIndex - mBaseAttributeCount];
547 }
548 return mBasePtr->GetAttribute(aIndex);
549 }
550
551 size_t GetAttributeCount();
552 void SetBase(WsfParseStruct* aBasePtr);
554 bool IsType(WsfParseStruct* aBasePtr)
555 {
556 if (aBasePtr == this)
557 {
558 return true;
559 }
560 if (!mBasePtr)
561 {
562 return false;
563 }
564 return (mBasePtr == aBasePtr || mBasePtr->IsType(aBasePtr));
565 }
566 WsfParseValueType* GetType() override;
567
568 std::vector<ScriptVariable> GetAllScriptVariables();
569
571 std::vector<WsfParseAttribute> mAttributes;
572 std::string mBaseName;
573 std::vector<ScriptVariable> mScriptVariables;
574
575 // Set of actions specified with the ' (initially ...) ' command
576 std::vector<WsfParseAction*> mInitialActions;
577
578protected:
581};
582
583#endif
Definition WsfParseAction.hpp:329
Definition WsfParseAlternate.hpp:22
An attribute which belongs to a WsfParseStruct.
Definition WsfParseRule.hpp:463
std::string mType
Definition WsfParseRule.hpp:483
std::string mName
Definition WsfParseRule.hpp:482
WsfParseValueType * mTypePtr
Definition WsfParseRule.hpp:485
unsigned int mFlags
Definition WsfParseRule.hpp:481
bool mIsPointer
Definition WsfParseRule.hpp:487
bool mHasDefaultValue
Definition WsfParseRule.hpp:486
Flags
Definition WsfParseRule.hpp:466
@ cIS_FIXED
Definition WsfParseRule.hpp:467
WsfParseAttribute()
Definition WsfParseRule.hpp:470
std::string mDefault
Definition WsfParseRule.hpp:484
Definition WsfParseRule.hpp:505
std::vector< NameValue > mNameValues
Definition WsfParseRule.hpp:508
std::pair< std::string, int > NameValue
Definition WsfParseRule.hpp:507
WsfParseEnumerationValues mValues
Definition WsfParseRule.hpp:522
WsfParseEnumeration(WsfParseRuleMemory &aMem, const std::string &aName)
Definition WsfParseRule.hpp:515
Matches a string of text with no whitespace.
Definition WsfParseRule.hpp:309
std::string GetRuleDescription() override
Definition WsfParseRule.hpp:317
bool MatchesString(const std::string &aString)
Definition WsfParseBasicRules.cpp:481
bool mIsTerminator
Definition WsfParseRule.hpp:320
bool mCaseSensitive
Definition WsfParseRule.hpp:319
bool ReadRange(WsfParser &aParser, UtTextDocumentRange &aRange, WsfParseNode *&aNode, bool aCreateNode) override
Definition WsfParseBasicRules.cpp:448
unsigned int mNodeFlags
Definition WsfParseRule.hpp:322
bool Read(WsfParser &aParser, WsfParseNode *&aNode) override
Definition WsfParseBasicRules.cpp:413
std::string mText
Definition WsfParseRule.hpp:321
WsfParseLiteral(WsfParseRuleMemory &aMem)
Definition WsfParseBasicRules.cpp:400
Definition WsfParseRule.hpp:350
WsfParseValue * FindValue(const std::string &aTypeName)
Definition WsfParseRule.cpp:391
std::string mOutputTypeName
Definition WsfParseRule.hpp:411
WsfParseRule * GetPassthrough() override
Definition WsfParseRule.hpp:387
WsfParseNamedRule * mOutputTypePtr
Definition WsfParseRule.hpp:412
WsfParseNamedRule * GetContext() const override
Definition WsfParseRule.hpp:386
std::string GetRuleDescription() override
Definition WsfParseRule.hpp:388
WsfParseRule * GetDefinition() const
Definition WsfParseRule.hpp:383
bool HasNestedRules() const
Definition WsfParseRule.hpp:368
std::string GetFullName() const
Definition WsfParseRule.cpp:295
bool IsPartValueRule()
Definition WsfParseRule.hpp:390
WsfParseNamedRule * Find(const std::string &aRuleName)
Definition WsfParseRule.cpp:365
WsfParseNamedRule(WsfParseRuleMemory &aMem)
Definition WsfParseRule.cpp:235
WsfParseNamedRule * mContextParent
The rule inside of which this rule is nested.
Definition WsfParseRule.hpp:407
std::vector< WsfParseRule * > GetSequence() override
Definition WsfParseRule.hpp:385
WsfParseNamedRule * FindImmediate(const std::string &aRuleName)
Definition WsfParseRule.cpp:381
std::string mInputTypeName
Definition WsfParseRule.hpp:409
WsfParseRuleDictionary * GetNestedRules() override
Definition WsfParseRule.hpp:370
WsfParseRule *& GetDefinition()
Definition WsfParseRule.hpp:384
void Swap(WsfParseNamedRule &aRhs)
Definition WsfParseRule.hpp:392
std::string mName
Definition WsfParseRule.hpp:408
void Initialize(int aSequence) override
Definition WsfParseRule.cpp:335
bool InitializeInputsOutputs()
Definition WsfParseRule.cpp:307
WsfParseRuleDictionary * mNestedRules
Definition WsfParseRule.hpp:418
WsfParseNamedRule * mInputTypePtr
Definition WsfParseRule.hpp:410
std::vector< WsfParseRule * > mReferencingRules
Definition WsfParseRule.hpp:415
WsfParseStruct * FindStruct(const std::string &aRuleName)
Definition WsfParseRule.cpp:355
Definition WsfParseNode.hpp:61
std::vector< WsfParseRule * > GetSequence() override
Definition WsfParseRule.hpp:303
Kind
Definition WsfParseRule.hpp:293
@ cNO_CHANGE
Definition WsfParseRule.hpp:295
@ cERROR_RULE
Definition WsfParseRule.hpp:294
Kind mKind
Definition WsfParseRule.hpp:304
WsfParseRule * GetPassthrough() override
Definition WsfParseRule.hpp:300
WsfParsePassthrough(WsfParseRuleMemory &aMem)
Definition WsfParseRule.hpp:286
Definition WsfParseRecurrence.hpp:21
Definition WsfParseRule.hpp:338
WsfParseNamedRule * Find(const std::string &aRule)
Definition WsfParseRule.cpp:212
void Add(WsfParseNamedRule *aRule)
Definition WsfParseRule.cpp:207
std::map< std::string, WsfParseNamedRule * > NameRuleMap
Definition WsfParseRule.hpp:343
NameRuleMap mNameToRule
Definition WsfParseRule.hpp:344
Definition WsfParseRule.hpp:263
void RuleAdded(WsfParseRule *aRulePtr)
Definition WsfParseRule.hpp:269
std::vector< WsfParseRule * > mRules
Definition WsfParseRule.hpp:272
WsfParseRuleMemory(const WsfParseRuleMemory &)=default
WsfParseRuleMemory()=default
Definition WsfParseRule.hpp:431
void SetReferencedRule(WsfParseRule *aRulePtr)
Definition WsfParseRule.hpp:443
std::vector< WsfParseRule * > GetSequence() override
Definition WsfParseRule.hpp:451
std::string mRuleName
Definition WsfParseRule.hpp:456
WsfParseNamedRule * GetRulePtr()
Definition WsfParseRule.hpp:452
WsfParseRule * GetPassthrough() override
Definition WsfParseRule.hpp:453
WsfParseRuleReference(WsfParseRuleMemory &aMem)
Definition WsfParseRule.hpp:433
std::string GetRuleDescription() override
Definition WsfParseRule.hpp:454
Definition WsfParseRule.hpp:131
WsfParseRule * GetSubordinateRule() const
Definition WsfParseRule.hpp:254
virtual bool ReadRange(WsfParser &aParser, UtTextDocumentRange &aRange, WsfParseNode *&aNode, bool aCreateNode)
Definition WsfParseRule.hpp:197
bool IsNamedRule() const
Definition WsfParseRule.hpp:233
virtual bool Read(WsfParser &aParser, WsfParseNode *&aNode)=0
virtual void Resolve(WsfParser &aParser, WsfParseNode *aNodePtr)
Definition WsfParseRule.hpp:208
WsfParseRule * mSubordinateRulePtr
Definition WsfParseRule.hpp:258
RuleType Type() const
Returns an enumeration specifying the derived type of the reader.
Definition WsfParseRule.hpp:186
virtual WsfParseNamedRule * GetContext() const
Definition WsfParseRule.hpp:216
ReaderFlags
Definition WsfParseRule.hpp:156
@ cIS_VALUE_RULE
Definition WsfParseRule.hpp:168
@ cCAN_RESOLVE
Definition WsfParseRule.hpp:158
@ cCAN_UNDO
Definition WsfParseRule.hpp:160
@ cIS_PASSTHROUGH
Definition WsfParseRule.hpp:165
@ cIS_SINGLE_TOKEN
Definition WsfParseRule.hpp:162
virtual std::string GetRuleDescription()
Definition WsfParseRule.hpp:219
virtual std::vector< WsfParseRule * > GetAlternates()
Definition WsfParseRule.hpp:214
void Swap(WsfParseRule &aRhs)
Definition WsfParseRule.hpp:176
int mReaderFlags
Definition WsfParseRule.hpp:249
void SetSubordinateRule(WsfParseRule *aRulePtr)
Definition WsfParseRule.hpp:255
virtual void Undo(WsfParser &aParser)
Definition WsfParseRule.hpp:204
virtual WsfParseRule * GetPassthrough()
Definition WsfParseRule.hpp:217
WsfParseRule(WsfParseRuleMemory &aMem, RuleType aType)
Definition WsfParseRule.cpp:85
RuleType
Definition WsfParseRule.hpp:134
@ cLINE_STRING
Definition WsfParseRule.hpp:145
@ cSTRING
Definition WsfParseRule.hpp:144
@ cTYPE_LOAD
Definition WsfParseRule.hpp:149
@ cALTERNATE
Definition WsfParseRule.hpp:139
@ cTYPE_COMMAND
Definition WsfParseRule.hpp:150
@ cPASSTHROUGH
Definition WsfParseRule.hpp:151
@ cRULE_REFERENCE
Definition WsfParseRule.hpp:141
@ cNAMED_RULE
Definition WsfParseRule.hpp:135
@ cVALUE
Definition WsfParseRule.hpp:136
@ cQUOTED_STRING
Definition WsfParseRule.hpp:146
@ cRECURRENCE
Definition WsfParseRule.hpp:140
@ cSCRIPT_BLOCK
Definition WsfParseRule.hpp:152
@ cINT
Definition WsfParseRule.hpp:143
@ cDELIMITED
Definition WsfParseRule.hpp:148
@ cSEQUENCE
Definition WsfParseRule.hpp:138
@ cREAL
Definition WsfParseRule.hpp:142
@ cSTRUCT
Definition WsfParseRule.hpp:137
@ cLITERAL
Definition WsfParseRule.hpp:147
virtual WsfParseRuleDictionary * GetNestedRules()
Definition WsfParseRule.hpp:215
WsfParseRule * mParentRulePtr
Pointer to the parent rule. This should be valid for unnamed rules.
Definition WsfParseRule.hpp:253
virtual std::vector< WsfParseRule * > GetSequence()
Definition WsfParseRule.hpp:213
int mUserId
Definition WsfParseRule.hpp:250
virtual ~WsfParseRule()=default
WsfParseRule(const WsfParseRule &)=default
int GetReaderFlags() const
Definition WsfParseRule.hpp:246
RuleType mRuleType
Definition WsfParseRule.hpp:248
virtual WsfParseValueType * GetType()
If the rule is also a type, return the type.
Definition WsfParseRule.hpp:222
Definition WsfParseSequence.hpp:21
Definition WsfParseRule.hpp:527
std::vector< WsfParseAction * > mInitialActions
Definition WsfParseRule.hpp:576
size_t FindAttributeIndex(const std::string &aName)
Definition WsfParseRule.cpp:497
WsfParseValueType * mTypePtr
Definition WsfParseRule.hpp:580
WsfParseStruct * GetBase()
Definition WsfParseRule.hpp:553
WsfParseAttribute & GetAttribute(size_t aIndex)
Definition WsfParseRule.hpp:542
std::vector< WsfParseAttribute > mAttributes
Definition WsfParseRule.hpp:571
std::string mBaseName
Definition WsfParseRule.hpp:572
void Initialize(int aSequence) override
Definition WsfParseRule.cpp:532
WsfParseStruct(WsfParseRuleMemory &aMem, const std::string &aRuleName)
Definition WsfParseRule.cpp:547
bool IsType(WsfParseStruct *aBasePtr)
Definition WsfParseRule.hpp:554
std::vector< ScriptVariable > mScriptVariables
Definition WsfParseRule.hpp:573
WsfParseStruct * mBasePtr
Definition WsfParseRule.hpp:579
WsfParseAttribute * FindAttribute(const std::string &aName)
Definition WsfParseRule.cpp:481
size_t mBaseAttributeCount
Definition WsfParseRule.hpp:570
Definition WsfParseRule.hpp:58
TypeKind mKind
Definition WsfParseRule.hpp:119
static WsfParseValueType * List(WsfParseValueType *aTemplatedType)
Definition WsfParseRule.hpp:77
WsfParseValueType * mTemplateType
Definition WsfParseRule.hpp:123
WsfParseStruct * mStructPtr
Definition WsfParseRule.hpp:121
std::string & GetTypeName()
Definition WsfParseRule.hpp:115
WsfParseValue * mValuePtr
Definition WsfParseRule.hpp:122
static WsfParseValueType * ObjectMap(WsfParseValueType *aTemplatedType)
Definition WsfParseRule.hpp:86
std::string mTypeName
Definition WsfParseRule.hpp:120
WsfParseValueType()
Definition WsfParseRule.hpp:68
TypeKind
Definition WsfParseRule.hpp:61
@ cLIST
Definition WsfParseRule.hpp:64
@ cSTRUCT
Definition WsfParseRule.hpp:62
@ cOBJECT_MAP
Definition WsfParseRule.hpp:65
@ cVALUE
Definition WsfParseRule.hpp:63
Definition WsfParseRule.hpp:492
bool mIsEnumeration
Definition WsfParseRule.hpp:500
~WsfParseValue() override=default
WsfParseValueType * GetType() override
If the rule is also a type, return the type.
Definition WsfParseRule.cpp:664
void Initialize(int aSequence) override
Definition WsfParseRule.cpp:659
WsfParseValueType * mTypePtr
Definition WsfParseRule.hpp:499
WsfParseValue(WsfParseRuleMemory &aMem, const std::string &aName)
Definition WsfParseRule.cpp:648
Definition WsfParser.hpp:36
Template specialization for wsf::comm::Address. Allows usage of Address in std::unordered_map/set.
Definition WsfCommAddress.hpp:185
void swap(WsfRoute &aLhs, WsfRoute &aRhs)
Definition WsfRoute.hpp:294
Definition WsfParseRule.hpp:530
std::string mVariableName
Definition WsfParseRule.hpp:533
bool mIsThisType
Definition WsfParseRule.hpp:531
std::string mTypeName
Definition WsfParseRule.hpp:532
Copyrights Multiple, All Rights Reserved