15#ifndef WSFPARSESOURCEINCLUDE_HPP
16#define WSFPARSESOURCEINCLUDE_HPP
18#include "UtMemory.hpp"
19#include "UtTextDocument.hpp"
56 void AddInclude(
const UtTextRange& aRange, UtTextDocument* aSourcePtr);
63 void AddComment(
const UtTextRange& aRange,
bool aIsLineComment);
112 bool aIsVirtualInclude,
113 UtTextRange aLocation,
114 UtTextDocument* aTargetSource,
115 std::unique_ptr<WsfParseSourceInclude> aIncludePtr);
std::pair< UtTextDocument *, size_t > WsfParseSourceIncludeId
Definition WsfParseSourceInclude.hpp:24
Definition WsfParseRule.hpp:131
Entry()
Definition WsfParseSourceInclude.hpp:80
bool mIsVirtualInclude
Definition WsfParseSourceInclude.hpp:95
EntryType mType
Definition WsfParseSourceInclude.hpp:94
Entry & operator=(Entry &&)=default
Entry(const Entry &)=delete
Entry & operator=(const Entry &)=delete
std::unique_ptr< WsfParseSourceInclude > mIncludePtr
Definition WsfParseSourceInclude.hpp:100
UtTextDocument * mTargetSource
Definition WsfParseSourceInclude.hpp:98
UtTextRange mLocation
Definition WsfParseSourceInclude.hpp:96
Definition WsfParseSourceInclude.hpp:31
std::vector< Entry > mEntries
Definition WsfParseSourceInclude.hpp:102
void AddPreprocessorEntry(EntryType aEntryType, const UtTextRange &aRange)
Definition WsfParseSourceInclude.cpp:119
WsfParseSourceInclude(WsfParseSourceInclude &&)=default
WsfParseSourceInclude()
Definition WsfParseSourceInclude.hpp:45
WsfParseSourceInclude & operator=(const WsfParseSourceInclude &)=delete
void AddComment(const UtTextRange &aRange, bool aIsLineComment)
Definition WsfParseSourceInclude.cpp:102
static bool IsValidLocation(int aLocation)
Definition WsfParseSourceInclude.hpp:35
static constexpr std::size_t cVIRTUAL_LOCATION
Definition WsfParseSourceInclude.hpp:33
UtTextRange mLocation
The location of the include directive. This can be null for the 'main' input file.
Definition WsfParseSourceInclude.hpp:71
size_t mIncludeCount
The number of times this file has been included.
Definition WsfParseSourceInclude.hpp:75
WsfParseSourceInclude * mParentPtr
Definition WsfParseSourceInclude.hpp:72
void AddVirtualInclude(WsfParseSourceInclude *aIncludePtr)
Definition WsfParseSourceInclude.cpp:77
WsfParseSourceIncludeId GetId() const
Definition WsfParseSourceInclude.hpp:67
void AddInclude(const UtTextRange &aRange, UtTextDocument *aSourcePtr)
Definition WsfParseSourceInclude.cpp:37
EntryType
Definition WsfParseSourceInclude.hpp:37
@ cBLOCK_COMMENT
Definition WsfParseSourceInclude.hpp:40
@ cPREPROCESSOR_VARIABLE
Definition WsfParseSourceInclude.hpp:42
@ cLINE_COMMENT
Definition WsfParseSourceInclude.hpp:39
@ cINCLUDE_COMMAND
Definition WsfParseSourceInclude.hpp:38
@ cPREPROCESSOR_DEFINE
Definition WsfParseSourceInclude.hpp:41
UtTextDocument * mSourcePtr
Definition WsfParseSourceInclude.hpp:73
WsfParseSourceInclude & operator=(WsfParseSourceInclude &&)=default
static const UtTextRange cVIRTUAL_RANGE
Definition WsfParseSourceInclude.hpp:19
WsfParseSourceInclude(const WsfParseSourceInclude &)=delete