"L. Spiro Engine"
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

lsg::CPreProc Class Reference

Parses a single expression related to #if and #elif. More...

#include <LSGPreProc.h>

List of all members.

Classes

struct  LSG_PREPROC_DEFINE

Public Types

enum  LSG_ERRORS { LSG_E_FAILURE, LSG_E_SUCCESS, LSG_E_ERROR }
typedef struct
lsg::CPreProc::LSG_PREPROC_DEFINE
LPLSG_PREPROC_DEFINE
typedef struct
lsg::CPreProc::LSG_PREPROC_DEFINE 
LPCLSG_PREPROC_DEFINE
typedef CMap
< LSG_PREPROC_DEFINE, CString > 
LSG_MACROS

Public Member Functions

CPreProcContainer &LSE_CALL GetContainer ()
LSG_ERRORS LSE_CALL Parse (const CString &_sExp)
LSBOOL LSE_CALL GetResult (const LSG_MACROS &_mMacros, LSBOOL &_bRet) const

Protected Member Functions

LSBOOL LSE_CALL EvalNode (LSUINT32 _ui32Index, LSINT64 &_i64Return, const LSG_MACROS &_mMacros) const

Protected Attributes

CPreProcContainer m_ppcContainer

Detailed Description

Parses a single expression related to #if and #elif.

Class CPreProc Description: Parses a single expression related to #if and #elif.


Member Typedef Documentation

A define.

The dictionary.


Member Enumeration Documentation

Error codes.


Member Function Documentation

LSBOOL LSE_CALL lsg::CPreProc::EvalNode ( LSUINT32  _ui32Index,
LSINT64 &  _i64Return,
const LSG_MACROS _mMacros 
) const [protected]

Process a single node and return the result of that node.

Parameters:
_ui32IndexThe index of the node to process.
_i64ReturnHolds the return value of the node.
_mMacrosThe macros.
Returns:
Returns true if the node was evaluated.
CPreProcContainer& LSE_CALL lsg::CPreProc::GetContainer ( )

Get the container.

Returns:
Returns the container.
LSBOOL LSE_CALL lsg::CPreProc::GetResult ( const LSG_MACROS _mMacros,
LSBOOL &  _bRet 
) const

Evaluate the parsed expression with the given macro dictionary.

Parameters:
_mMacrosThe macros.
_bRetHolds the result of the expression.
Returns:
Returns true if the expression was successfully evaluated.
LSG_ERRORS LSE_CALL lsg::CPreProc::Parse ( const CString &  _sExp)

Parse an expression, returning an error code.

Parameters:
_sExpThe expression to parse.
Returns:
Returns an error code depending on the result of the expression. LSG_E_ERROR is returned if the expression is bad. LSG_E_FAILURE indicates the expression is valid, but evaluates to 0. LSG_E_SUCCESS indicates that the expression is valid and evaluates to 1.

Member Data Documentation

The container for holding the parsed data.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator