00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef MU_PARSER_CALLBACK_H
00027 #define MU_PARSER_CALLBACK_H
00028
00029 #include "muParserDef.h"
00030
00035 namespace mu
00036 {
00037
00051 class ParserCallback
00052 {
00053 public:
00054 ParserCallback(fun_type0 a_pFun, bool a_bAllowOpti);
00055 ParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode=cmFUNC);
00056 ParserCallback(fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode=cmFUNC);
00057 ParserCallback(fun_type3 a_pFun, bool a_bAllowOpti);
00058 ParserCallback(fun_type4 a_pFun, bool a_bAllowOpti);
00059 ParserCallback(fun_type5 a_pFun, bool a_bAllowOpti);
00060 ParserCallback(multfun_type a_pFun, bool a_bAllowOpti);
00061 ParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti);
00062 ParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti);
00063 ParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti);
00064 ParserCallback();
00065 ParserCallback(const ParserCallback &a_Fun);
00066
00067 ParserCallback* Clone() const;
00068
00069 bool IsOptimizable() const;
00070 void* GetAddr() const;
00071 ECmdCode GetCode() const;
00072 ETypeCode GetType() const;
00073 int GetPri() const;
00074 int GetArgc() const;
00075
00076 private:
00077 void *m_pFun;
00078
00084 int m_iArgc;
00085 int m_iPri;
00086 ECmdCode m_iCode;
00087 ETypeCode m_iType;
00088 bool m_bAllowOpti;
00089 };
00090
00091
00093 typedef std::map<string_type, ParserCallback> funmap_type;
00094
00095 }
00096
00097 #endif
00098