15#ifndef WSFPARSEINDEX_HPP
16#define WSFPARSEINDEX_HPP
23#include "UtHistoryMap.hpp"
24#include "UtMemoryDebug.hpp"
25#include "UtReferenceCount.hpp"
26#include "UtStringRef.hpp"
27#include "UtTextDocument.hpp"
58 return (mIncludeCount.find(aFullPath) != mIncludeCount.end());
62 size_t AddInclude(
const UtStringRef& aFullPath) {
return ++mIncludeCount[aFullPath]; }
64 const std::vector<UtStringRef>&
GetIncludePath()
const {
return mIncludePath; }
65 const std::map<UtStringRef, size_t>&
GetIncludes()
const {
return mIncludeCount; }
69 mParseVariables[aName] = aValue;
71 const UtTextDocumentRange&
GetParseVariable(
const std::string& aName) {
return mParseVariables[aName]; }
76 assert(aCurrentType !=
nullptr);
77 mCurrentTypeStack.push_back(aCurrentType);
82 assert(!mCurrentTypeStack.empty());
83 return mCurrentTypeStack.back();
96 int mGeneratedNameCount;
97 std::map<UtStringRef, UtTextDocumentRange> mParseVariables;
101 std::map<UtStringRef, size_t> mIncludeCount;
102 std::vector<UtStringRef> mIncludePath;
103 std::map<UtStringRef, UtStringRef> mPathVariables;
105 std::vector<WsfParseType*> mCurrentTypeStack;
@ cMDB_PARSE_INDEX
Definition WsfParseDebugMarkers.hpp:27
Definition WsfParseDefinitions.hpp:39
Definition WsfParseIndex.hpp:40
const UtTextDocumentRange & GetParseVariable(const std::string &aName)
Definition WsfParseIndex.hpp:71
const std::map< UtStringRef, size_t > & GetIncludes() const
Definition WsfParseIndex.hpp:65
void SetParseVariable(const std::string &aName, const UtTextDocumentRange &aValue)
Definition WsfParseIndex.hpp:67
void DefinePathVariable(const std::string &aVariableName, const std::string &aValue)
Definition WsfParseIndex.cpp:53
void UndefinePathVariable(const std::string &aVariableName)
Definition WsfParseIndex.cpp:58
void LoadCurrentType(WsfParseType *aCurrentType)
Definition WsfParseIndex.hpp:74
int GenerateName()
Definition WsfParseIndex.hpp:91
bool HasInclude(const std::string &aFullPath) const
Returns 'true' if aFullPath has already been included.
Definition WsfParseIndex.hpp:56
void Clear()
Definition WsfParseIndex.cpp:35
const std::vector< UtStringRef > & GetIncludePath() const
Definition WsfParseIndex.hpp:64
WsfParseType * GetCurrentType()
Definition WsfParseIndex.hpp:80
void ClearParseVariable(const std::string &aName)
Definition WsfParseIndex.hpp:72
size_t AddInclude(const UtStringRef &aFullPath)
Add an included file.
Definition WsfParseIndex.hpp:62
void ResetFilePath()
Definition WsfParseIndex.cpp:63
void UnloadCurrentType()
Definition WsfParseIndex.hpp:79
WsfParseType mUserTypes
Definition WsfParseIndex.hpp:90
WsfParseIndex(WsfParseDefinitions *aDefinitionsPtr)
Definition WsfParseIndex.cpp:22
std::string SubstitutePathVariables(const std::string &aString) const
Definition WsfParseIndex.cpp:68
void AddFilePath(const std::string &aPath)
Definition WsfParseIndex.cpp:44
Definition WsfParseNode.hpp:61
Definition WsfParseRule.hpp:131
Definition WsfParseType.hpp:40
Definition WsfParser.hpp:36