WSF
WsfParseTypeLoadRule Class Reference

#include <WsfParseTypeLoadRule.hpp>

Inheritance diagram for WsfParseTypeLoadRule:
Collaboration diagram for WsfParseTypeLoadRule:

Public Types

using Operation = WsfParseTypeInfoData::Operation
Public Types inherited from WsfParseRule
enum  RuleType {
  cNAMED_RULE , cVALUE , cSTRUCT , cSEQUENCE ,
  cALTERNATE , cRECURRENCE , cRULE_REFERENCE , cREAL ,
  cINT , cSTRING , cLINE_STRING , cQUOTED_STRING ,
  cLITERAL , cDELIMITED , cTYPE_LOAD , cTYPE_COMMAND ,
  cPASSTHROUGH , cSCRIPT_BLOCK
}
enum  ReaderFlags {
  cCAN_RESOLVE = 1 , cCAN_UNDO = 2 , cIS_SINGLE_TOKEN = 4 , cIS_PASSTHROUGH = 8 ,
  cIS_VALUE_RULE = 0x10
}

Public Member Functions

 WsfParseTypeLoadRule (WsfParseRuleMemory &aMem, Operation aOperation, bool aAllowReplace=false)
bool Read (WsfParser &aParser, WsfParseNode *&aNode) override
void Undo (WsfParser &aParser) override
void Resolve (WsfParser &aParser, WsfParseNode *aNodePtr) override
Operation GetOperation () const
const WsfParseTypeNameGetSaveType () const
const WsfParseTypeNameGetLoadType () const
const WsfParseTypePathGetBackupType () const
bool CreateTypePath (WsfParseTypePath &aPath, WsfParser &aParser, WsfParseIndex &aIndex, const WsfParseTypeName &aKey, UtTextDocumentRange &aInputRange)
Public Member Functions inherited from WsfParseRule
 WsfParseRule (WsfParseRuleMemory &aMem, RuleType aType)
virtual ~WsfParseRule ()=default
 WsfParseRule (const WsfParseRule &)=default
void Swap (WsfParseRule &aRhs)
RuleType Type () const
 Returns an enumeration specifying the derived type of the reader.
virtual bool ReadRange (WsfParser &aParser, UtTextDocumentRange &aRange, WsfParseNode *&aNode, bool aCreateNode)
virtual void Initialize (int aSequence)
virtual std::vector< WsfParseRule * > GetSequence ()
virtual std::vector< WsfParseRule * > GetAlternates ()
virtual WsfParseRuleDictionaryGetNestedRules ()
virtual WsfParseNamedRuleGetContext () const
virtual WsfParseRuleGetPassthrough ()
virtual std::string GetRuleDescription ()
virtual WsfParseValueTypeGetType ()
 If the rule is also a type, return the type.
WsfParseStructGetContainingStruct () const
WsfParseStructGetStruct ()
WsfParseNamedRuleGetEntryType ()
WsfParseNamedRuleGetInputType ()
WsfParseNamedRuleGetOutputType ()
WsfParseNamedRuleGetBestContext ()
WsfParseNamedRuleGetVarContext ()
bool IsNamedRule () const
int GetReaderFlags () const
WsfParseRuleGetSubordinateRule () const
void SetSubordinateRule (WsfParseRule *aRulePtr)

Public Attributes

WsfParseTypeName mSaveType
WsfParseTypeName mLoadType
WsfParseTypePath mBackupLoadType
bool mAllowRedefinition
bool mGenerateNameInConflict
Public Attributes inherited from WsfParseRule
RuleType mRuleType
int mReaderFlags
int mUserId
WsfParseRulemParentRulePtr
 Pointer to the parent rule. This should be valid for unnamed rules.

Protected Member Functions

UtStringRef GenerateName (WsfParser &aParser, bool aIsConflict)
WsfParseTypeFindLoadType (WsfParser &aParser, WsfParseIndex &aIndex, const WsfParseTypePath &aKey, bool aNested)
WsfParseTypeInfoDataCreateAuxData (const WsfParseTypePath *aSaveType, const WsfParseTypePath *aLoadType)
void SaveTypeToNode (WsfParseType *aTypePtr, WsfParseNode *aNode)
UtStringRef GetLoadType (WsfParser &aParser, const WsfParseTypeName &aLoadType)
UtStringRef GetSaveType (WsfParser &aParser)

Protected Attributes

Operation mOperation
Protected Attributes inherited from WsfParseRule
WsfParseRulemSubordinateRulePtr

Member Typedef Documentation

◆ Operation

Constructor & Destructor Documentation

◆ WsfParseTypeLoadRule()

Member Function Documentation

◆ CreateAuxData()

◆ CreateTypePath()

bool WsfParseTypeLoadRule::CreateTypePath ( WsfParseTypePath & aPath,
WsfParser & aParser,
WsfParseIndex & aIndex,
const WsfParseTypeName & aKey,
UtTextDocumentRange & aInputRange )

◆ FindLoadType()

◆ GenerateName()

UtStringRef WsfParseTypeLoadRule::GenerateName ( WsfParser & aParser,
bool aIsConflict )
protected

◆ GetBackupType()

const WsfParseTypePath & WsfParseTypeLoadRule::GetBackupType ( ) const
inline

References mBackupLoadType.

◆ GetLoadType() [1/2]

const WsfParseTypeName & WsfParseTypeLoadRule::GetLoadType ( ) const
inline

References mLoadType.

Referenced by wizard::AutoComplete::ExpandRule().

◆ GetLoadType() [2/2]

UtStringRef WsfParseTypeLoadRule::GetLoadType ( WsfParser & aParser,
const WsfParseTypeName & aLoadType )
protected

◆ GetOperation()

◆ GetSaveType() [1/2]

const WsfParseTypeName & WsfParseTypeLoadRule::GetSaveType ( ) const
inline

References mSaveType.

◆ GetSaveType() [2/2]

UtStringRef WsfParseTypeLoadRule::GetSaveType ( WsfParser & aParser)
protected

◆ Read()

◆ Resolve()

void WsfParseTypeLoadRule::Resolve ( WsfParser & aParser,
WsfParseNode * aNodePtr )
overridevirtual

Called by a command reader if the full command is successfully read. You must set cCAN_RESOLVE in the reader flags to receive this call.

Reimplemented from WsfParseRule.

References WsfParseNode::cTYPE_NAME_NODE, WsfParseNode::cTYPE_REFERENCE_NODE, WsfParseNode::Down(), WsfParser::GetParseIndex(), WsfParseNode::mFlags, WsfParseNode::mValue, WsfParseNode::Right(), and WsfParseIndex::UnloadCurrentType().

◆ SaveTypeToNode()

void WsfParseTypeLoadRule::SaveTypeToNode ( WsfParseType * aTypePtr,
WsfParseNode * aNode )
protected

◆ Undo()

void WsfParseTypeLoadRule::Undo ( WsfParser & aParser)
overridevirtual

Called by a command reader if the reader just read in a value that has now been rejected due to a later failure. You must set cCAN_UNDO in the reader flags to receive this call.

Reimplemented from WsfParseRule.

References WsfParser::GetParseIndex(), and WsfParseIndex::UnloadCurrentType().

Member Data Documentation

◆ mAllowRedefinition

bool WsfParseTypeLoadRule::mAllowRedefinition

◆ mBackupLoadType

WsfParseTypePath WsfParseTypeLoadRule::mBackupLoadType

Referenced by GetBackupType(), and Read().

◆ mGenerateNameInConflict

bool WsfParseTypeLoadRule::mGenerateNameInConflict

Referenced by Read(), and WsfParseTypeLoadRule().

◆ mLoadType

◆ mOperation

Operation WsfParseTypeLoadRule::mOperation
protected

◆ mSaveType


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