WSF
WsfParseSourceInclude Class Reference

#include <WsfParseSourceInclude.hpp>

Collaboration diagram for WsfParseSourceInclude:

Classes

class  Entry

Public Types

enum  EntryType {
  cINCLUDE_COMMAND , cLINE_COMMENT , cBLOCK_COMMENT , cPREPROCESSOR_DEFINE ,
  cPREPROCESSOR_VARIABLE
}

Public Member Functions

 WsfParseSourceInclude ()
 WsfParseSourceInclude (const WsfParseSourceInclude &)=delete
 WsfParseSourceInclude (WsfParseSourceInclude &&)=default
WsfParseSourceIncludeoperator= (const WsfParseSourceInclude &)=delete
WsfParseSourceIncludeoperator= (WsfParseSourceInclude &&)=default
 ~WsfParseSourceInclude ()
void AddInclude (const UtTextRange &aRange, UtTextDocument *aSourcePtr)
void AddInclude (const UtTextRange &aRange, WsfParseSourceInclude *aIncludePtr)
void AddVirtualInclude (WsfParseSourceInclude *aIncludePtr)
void AddComment (const UtTextRange &aRange, bool aIsLineComment)
void AddPreprocessorEntry (EntryType aEntryType, const UtTextRange &aRange)
WsfParseSourceIncludeId GetId () const
WsfParseSourceIncludeGetRoot ()

Static Public Member Functions

static bool IsValidLocation (int aLocation)

Public Attributes

UtTextRange mLocation
 The location of the include directive. This can be null for the 'main' input file.
WsfParseSourceIncludemParentPtr
UtTextDocument * mSourcePtr
size_t mIncludeCount
 The number of times this file has been included.
std::vector< EntrymEntries

Static Public Attributes

static constexpr std::size_t cVIRTUAL_LOCATION = 0x0fffffff
static const UtTextRange cVIRTUAL_RANGE

Detailed Description

Represents an instance where a file is included. include_once where the file has already been used does not result in a WsfParseSourceInclude. Most of the time There is a 1-to-1 correlation between this class and UtTextDocument. This is primarily required for strange usage of include.

Member Enumeration Documentation

◆ EntryType

Enumerator
cINCLUDE_COMMAND 
cLINE_COMMENT 
cBLOCK_COMMENT 
cPREPROCESSOR_DEFINE 
cPREPROCESSOR_VARIABLE 

Constructor & Destructor Documentation

◆ WsfParseSourceInclude() [1/3]

WsfParseSourceInclude::WsfParseSourceInclude ( )
inline

◆ WsfParseSourceInclude() [2/3]

WsfParseSourceInclude::WsfParseSourceInclude ( const WsfParseSourceInclude & )
delete

◆ WsfParseSourceInclude() [3/3]

WsfParseSourceInclude::WsfParseSourceInclude ( WsfParseSourceInclude && )
default

◆ ~WsfParseSourceInclude()

WsfParseSourceInclude::~WsfParseSourceInclude ( )

References mEntries, and mParentPtr.

Member Function Documentation

◆ AddComment()

void WsfParseSourceInclude::AddComment ( const UtTextRange & aRange,
bool aIsLineComment )

Adds a comment entry

Parameters
aRangeis the location of the comment in the input file
aIsLineCommentis whether the comment is a line (# or //) comment

References cBLOCK_COMMENT, cLINE_COMMENT, mEntries, WsfParseSourceInclude::Entry::mLocation, and WsfParseSourceInclude::Entry::mType.

Referenced by operator=().

◆ AddInclude() [1/2]

void WsfParseSourceInclude::AddInclude ( const UtTextRange & aRange,
UtTextDocument * aSourcePtr )

◆ AddInclude() [2/2]

◆ AddPreprocessorEntry()

void WsfParseSourceInclude::AddPreprocessorEntry ( EntryType aEntryType,
const UtTextRange & aRange )

◆ AddVirtualInclude()

◆ GetId()

WsfParseSourceIncludeId WsfParseSourceInclude::GetId ( ) const
inline

References mIncludeCount, and mSourcePtr.

◆ GetRoot()

WsfParseSourceInclude * WsfParseSourceInclude::GetRoot ( )

◆ IsValidLocation()

bool WsfParseSourceInclude::IsValidLocation ( int aLocation)
inlinestatic

◆ operator=() [1/2]

WsfParseSourceInclude & WsfParseSourceInclude::operator= ( const WsfParseSourceInclude & )
delete

◆ operator=() [2/2]

Member Data Documentation

◆ cVIRTUAL_LOCATION

std::size_t WsfParseSourceInclude::cVIRTUAL_LOCATION = 0x0fffffff
staticconstexpr

◆ cVIRTUAL_RANGE

const UtTextRange WsfParseSourceInclude::cVIRTUAL_RANGE
static
Initial value:
static constexpr std::size_t cVIRTUAL_LOCATION
Definition WsfParseSourceInclude.hpp:33

Referenced by AddVirtualInclude().

◆ mEntries

◆ mIncludeCount

size_t WsfParseSourceInclude::mIncludeCount

The number of times this file has been included.

Referenced by GetId(), and WsfParseSourceInclude().

◆ mLocation

UtTextRange WsfParseSourceInclude::mLocation

The location of the include directive. This can be null for the 'main' input file.

◆ mParentPtr

WsfParseSourceInclude* WsfParseSourceInclude::mParentPtr

◆ mSourcePtr


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