OpcUaCanOpen
CANopen OPC-UA server
muParserCallback.h
Go to the documentation of this file.
1 /*
2  __________
3  _____ __ __\______ \_____ _______ ______ ____ _______
4  / \ | | \| ___/\__ \ \_ __ \/ ___/_/ __ \\_ __ \
5  | Y Y \| | /| | / __ \_| | \/\___ \ \ ___/ | | \/
6  |__|_| /|____/ |____| (____ /|__| /____ > \___ >|__|
7  \/ \/ \/ \/
8  Copyright (C) 2004-2011 Ingo Berg
9 
10  Permission is hereby granted, free of charge, to any person obtaining a copy of this
11  software and associated documentation files (the "Software"), to deal in the Software
12  without restriction, including without limitation the rights to use, copy, modify,
13  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
14  permit persons to whom the Software is furnished to do so, subject to the following conditions:
15 
16  The above copyright notice and this permission notice shall be included in all copies or
17  substantial portions of the Software.
18 
19  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
20  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
22  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25 
26 #ifndef MU_PARSER_CALLBACK_H
27 #define MU_PARSER_CALLBACK_H
28 
29 #include "muParserDef.h"
30 
35 namespace mu
36 {
37 
51 {
52 public:
53  ParserCallback(fun_type0 a_pFun, bool a_bAllowOpti);
54  ParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode=cmFUNC);
55  ParserCallback(fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eAssociativity);
56  ParserCallback(fun_type2 a_pFun, bool a_bAllowOpti);
57  ParserCallback(fun_type3 a_pFun, bool a_bAllowOpti);
58  ParserCallback(fun_type4 a_pFun, bool a_bAllowOpti);
59  ParserCallback(fun_type5 a_pFun, bool a_bAllowOpti);
60  ParserCallback(fun_type6 a_pFun, bool a_bAllowOpti);
61  ParserCallback(fun_type7 a_pFun, bool a_bAllowOpti);
62  ParserCallback(fun_type8 a_pFun, bool a_bAllowOpti);
63  ParserCallback(fun_type9 a_pFun, bool a_bAllowOpti);
64  ParserCallback(fun_type10 a_pFun, bool a_bAllowOpti);
65 
66  ParserCallback(bulkfun_type0 a_pFun, bool a_bAllowOpti);
67  ParserCallback(bulkfun_type1 a_pFun, bool a_bAllowOpti);
68  ParserCallback(bulkfun_type2 a_pFun, bool a_bAllowOpti);
69  ParserCallback(bulkfun_type3 a_pFun, bool a_bAllowOpti);
70  ParserCallback(bulkfun_type4 a_pFun, bool a_bAllowOpti);
71  ParserCallback(bulkfun_type5 a_pFun, bool a_bAllowOpti);
72  ParserCallback(bulkfun_type6 a_pFun, bool a_bAllowOpti);
73  ParserCallback(bulkfun_type7 a_pFun, bool a_bAllowOpti);
74  ParserCallback(bulkfun_type8 a_pFun, bool a_bAllowOpti);
75  ParserCallback(bulkfun_type9 a_pFun, bool a_bAllowOpti);
76  ParserCallback(bulkfun_type10 a_pFun, bool a_bAllowOpti);
77 
78  ParserCallback(multfun_type a_pFun, bool a_bAllowOpti);
79  ParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti);
80  ParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti);
81  ParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti);
83  ParserCallback(const ParserCallback &a_Fun);
84 
85  ParserCallback* Clone() const;
86 
87  bool IsOptimizable() const;
88  void* GetAddr() const;
89  ECmdCode GetCode() const;
90  ETypeCode GetType() const;
91  int GetPri() const;
92  EOprtAssociativity GetAssociativity() const;
93  int GetArgc() const;
94 
95 private:
96  void *m_pFun;
97 
103  int m_iArgc;
104  int m_iPri;
109 };
110 
111 //------------------------------------------------------------------------------
113 typedef std::map<string_type, ParserCallback> funmap_type;
114 
115 } // namespace mu
116 
117 #endif
118