Qore Programming Language  0.8.7
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
BuiltinFunctionList.h
Go to the documentation of this file.
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3  BuiltinFunctionList.h
4 
5  Qore programming language
6 
7  Copyright 2003 - 2013 David Nichols
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Lesser General Public
11  License as published by the Free Software Foundation; either
12  version 2.1 of the License, or (at your option) any later version.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23 
24 #ifndef _QORE_BUILTINFUNCTIONLIST_H
25 
26 #define _QORE_BUILTINFUNCTIONLIST_H
27 
28 #include <qore/common.h>
29 #include <qore/Restrictions.h>
30 #include <qore/QoreThreadLock.h>
31 
32 #include <stdarg.h>
33 
41 class QoreFunction;
42 
44 
48 private:
49  // not implemented
51  DLLLOCAL BuiltinFunctionList& operator=(const BuiltinFunctionList&);
52  DLLLOCAL void *operator new(size_t);
53 
54 public:
55  DLLLOCAL BuiltinFunctionList();
56 
58 
65  DLLEXPORT static void add(const char *name, q_func_t f, int functional_domain = QDOM_DEFAULT);
66 
68 
80  DLLEXPORT static void add2(const char *name, q_func_t f, int64 code_flags = QC_NO_FLAGS, int64 functional_domain = QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo = 0, unsigned num_params = 0, ...);
81 
83 
96  DLLEXPORT static void add3(const char *name, q_func_t f, int64 code_flags = QC_NO_FLAGS, int64 functional_domain = QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo = 0, const type_vec_t &typeList = type_vec_t(), const arg_vec_t &defaultArgList = arg_vec_t());
97 
99 
101  DLLEXPORT static int size();
102 
104 
108  DLLEXPORT static const QoreFunction* find(const char *name);
109 };
110 
112 
114 DLLEXPORT extern BuiltinFunctionList builtinFunctions;
115 
116 #endif // _QORE_BUILTINFUNCTIONLIST_H