Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CPreprocessorWrapper Class Reference

Convenience wrapper around CPreprocessor. More...

#include <PreprocessorWrapper.h>

Public Types

using IncludeRetrieverCallback = std::function< bool(const CStr &, CStr &out)>
 

Public Member Functions

 CPreprocessorWrapper ()
 
 CPreprocessorWrapper (const IncludeRetrieverCallback &includeCallback)
 
void AddDefine (const char *name, const char *value)
 
void AddDefines (const CShaderDefines &defines)
 
bool TestConditional (const CStr &expr)
 
CStr ResolveIncludes (const CStr &source)
 
CStr Preprocess (const CStr &input)
 

Static Public Member Functions

static void PyrogenesisShaderError (int iLine, const char *iError, const Ogre::CPreprocessor::Token *iToken)
 

Private Attributes

Ogre::CPreprocessor m_Preprocessor
 
IncludeRetrieverCallback m_IncludeCallback
 
std::unordered_map< CStr, CStr > m_IncludeCache
 

Detailed Description

Convenience wrapper around CPreprocessor.

Member Typedef Documentation

◆ IncludeRetrieverCallback

using CPreprocessorWrapper::IncludeRetrieverCallback = std::function<bool(const CStr&, CStr& out)>

Constructor & Destructor Documentation

◆ CPreprocessorWrapper() [1/2]

CPreprocessorWrapper::CPreprocessorWrapper ( )

◆ CPreprocessorWrapper() [2/2]

CPreprocessorWrapper::CPreprocessorWrapper ( const IncludeRetrieverCallback includeCallback)

Member Function Documentation

◆ AddDefine()

void CPreprocessorWrapper::AddDefine ( const char *  name,
const char *  value 
)

◆ AddDefines()

void CPreprocessorWrapper::AddDefines ( const CShaderDefines defines)

◆ Preprocess()

CStr CPreprocessorWrapper::Preprocess ( const CStr &  input)

◆ PyrogenesisShaderError()

void CPreprocessorWrapper::PyrogenesisShaderError ( int  iLine,
const char *  iError,
const Ogre::CPreprocessor::Token *  iToken 
)
static

◆ ResolveIncludes()

CStr CPreprocessorWrapper::ResolveIncludes ( const CStr &  source)

◆ TestConditional()

bool CPreprocessorWrapper::TestConditional ( const CStr &  expr)

Member Data Documentation

◆ m_IncludeCache

std::unordered_map<CStr, CStr> CPreprocessorWrapper::m_IncludeCache
private

◆ m_IncludeCallback

IncludeRetrieverCallback CPreprocessorWrapper::m_IncludeCallback
private

◆ m_Preprocessor

Ogre::CPreprocessor CPreprocessorWrapper::m_Preprocessor
private

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