"L. Spiro Engine"

F:/My Projects/LSEngine/Modules/LSGraphicsLib/Src/PreProc/LSGPreProc.h

00001 
00016 #ifndef __LSG_PREPROC_H__
00017 #define __LSG_PREPROC_H__
00018 
00019 #include "../LSGGraphicsLib.h"
00020 #include "LSGPreProcSyntaxNodes.h"              // Must be included before LSGPreProcParser.h.
00021 #include "../PreProcGen/LSGPreProcParser.h"
00022 #include "LSGPreProcContainer.h"
00023 #include "Map/LSTLMap.h"
00024 
00025 namespace lsg {
00026 
00033         class CPreProc {
00034         public :
00035                 // == Various constructors.
00036                 LSE_CALLCTOR                                                            CPreProc();
00037 
00038                 
00039                 // == Enumerations.
00043                 enum LSG_ERRORS {
00044                         LSG_E_FAILURE,
00045                         LSG_E_SUCCESS,
00046                         LSG_E_ERROR,
00047                 };
00048 
00049 
00050                 // == Types.
00054                 typedef struct LSG_PREPROC_DEFINE {
00058                         CString                                                                 sName;
00059 
00063                         CVector<CString>                                                sParms;
00064 
00065 
00066                         // == Operators.
00073                         LSG_PREPROC_DEFINE & LSE_CALL                   operator = ( const LSG_PREPROC_DEFINE &_pdOther );
00074 
00082                         LSBOOL LSE_CALL                                                 operator < ( const LSG_PREPROC_DEFINE &_pdOther ) const;
00083 
00090                         LSBOOL LSE_CALL                                                 operator == ( const LSG_PREPROC_DEFINE &_pdOther ) const;
00091                 } * LPLSG_PREPROC_DEFINE, * const LPCLSG_PREPROC_DEFINE;
00092 
00096                 typedef CMap<LSG_PREPROC_DEFINE, CString>       LSG_MACROS;
00097 
00098 
00099                 // == Functions.
00105                 CPreProcContainer & LSE_CALL                            GetContainer();
00106 
00115                 LSG_ERRORS LSE_CALL                                                     Parse( const CString &_sExp );
00116 
00124                 LSBOOL LSE_CALL                                                         GetResult( const LSG_MACROS &_mMacros, LSBOOL &_bRet ) const;
00125 
00126 
00127         protected :
00128                 // == Members.
00132                 CPreProcContainer                                                       m_ppcContainer;
00133 
00134 
00135                 // == Functions.
00144                 LSBOOL LSE_CALL                                                         EvalNode( LSUINT32 _ui32Index, LSINT64 &_i64Return, const LSG_MACROS &_mMacros ) const;
00145         };
00146 
00147 }       // namespace lsg
00148 
00149 #endif  // __LSG_PREPROC_H__
00150 
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator