Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Public Attributes | List of all members
castor::FileParserContext Class Reference

#include <FileParserContext.hpp>

Inheritance diagram for castor::FileParserContext:
Inheritance graph
[legend]
Collaboration diagram for castor::FileParserContext:
Collaboration graph
[legend]

Public Member Functions

CU_API FileParserContext (FileParser &parser, Path const &path)
 Constructor.
 
virtual CU_API ~FileParserContext () noexcept=default
 Destructor.
 
CU_API void registerUserContext (String const &name, void *data)
 Registers a user context.
 
CU_API void * unregisterUserContext (String const &name)
 Unregisters a user context.
 
CU_API bool hasUserContext (String const &name)
 Retrieves a user context.
 
CU_API void * getUserContext (String const &name)
 Retrieves a user context.
 

Public Attributes

Path file {}
 
unsigned long long line {}
 
Deque< SectionIdsections {}
 
Deque< void * > blocks {}
 
SectionId pendingSection {}
 
void * pendingBlock {}
 
String functionName {}
 
StringMap< void * > userContexts {}
 
FileParserparser {}
 
LoggerInstancelogger {}
 
PreprocessedFilepreprocessed {}
 
Vector< BlockContextallocatedBlocks
 

Additional Inherited Members

- Protected Member Functions inherited from castor::NonMovable
 NonMovable ()=default
 Constructor.
 
 ~NonMovable () noexcept=default
 Destructor.
 

Constructor & Destructor Documentation

◆ FileParserContext()

CU_API castor::FileParserContext::FileParserContext ( FileParser & parser,
Path const & path )
explicit

Constructor.

Parameters
[in]parserThe parser.
[in]pathThe file access path.

◆ ~FileParserContext()

virtual CU_API castor::FileParserContext::~FileParserContext ( )
virtualdefaultnoexcept

Destructor.

Member Function Documentation

◆ getUserContext()

CU_API void * castor::FileParserContext::getUserContext ( String const & name)

Retrieves a user context.

Parameters
[in]nameThe context name.
Returns
The user context data.

◆ hasUserContext()

CU_API bool castor::FileParserContext::hasUserContext ( String const & name)

Retrieves a user context.

Parameters
[in]nameThe context name.
Returns
The user context data.

◆ registerUserContext()

CU_API void castor::FileParserContext::registerUserContext ( String const & name,
void * data )

Registers a user context.

Parameters
[in]nameThe context name, must be unique.
[in]dataThe user context data.

◆ unregisterUserContext()

CU_API void * castor::FileParserContext::unregisterUserContext ( String const & name)

Unregisters a user context.

Parameters
[in]nameThe context name.
Returns
The user context data.

Member Data Documentation

◆ allocatedBlocks

Vector< BlockContext > castor::FileParserContext::allocatedBlocks

The allocated block contexts.

◆ blocks

Deque< void * > castor::FileParserContext::blocks {}

The context blocks stack.

◆ file

Path castor::FileParserContext::file {}

The file currently parsed.

◆ functionName

String castor::FileParserContext::functionName {}

The current function name.

◆ line

unsigned long long castor::FileParserContext::line {}

The current line.

◆ logger

LoggerInstance* castor::FileParserContext::logger {}

The logger instance.

◆ parser

FileParser* castor::FileParserContext::parser {}

The parser.

◆ pendingBlock

void* castor::FileParserContext::pendingBlock {}

The block context to push on the stack.

◆ pendingSection

SectionId castor::FileParserContext::pendingSection {}

The section to push on the stack.

◆ preprocessed

PreprocessedFile* castor::FileParserContext::preprocessed {}

The preprocessed file.

◆ sections

Deque< SectionId > castor::FileParserContext::sections {}

The sections stack.

◆ userContexts

StringMap< void * > castor::FileParserContext::userContexts {}

The user context data, useful in plug-ins.


The documentation for this class was generated from the following file: