All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
BuiltinFunctionList.h
Go to the documentation of this file.
/* -*- mode: c++; indent-tabs-mode: nil -*- */
/*
BuiltinFunctionList.h
Qore programming language
Copyright 2003 - 2013 David Nichols
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _QORE_BUILTINFUNCTIONLIST_H
#define _QORE_BUILTINFUNCTIONLIST_H
#include <qore/common.h>
#include <qore/Restrictions.h>
#include <qore/QoreThreadLock.h>
#include <stdarg.h>
class QoreFunction;
class BuiltinFunctionList {
private:
// not implemented
DLLLOCAL BuiltinFunctionList(const BuiltinFunctionList&);
DLLLOCAL BuiltinFunctionList& operator=(const BuiltinFunctionList&);
DLLLOCAL void *operator new(size_t);
public:
DLLLOCAL BuiltinFunctionList();
DLLEXPORT static void add(const char *name, q_func_t f, int functional_domain = QDOM_DEFAULT);
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, ...);
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());
DLLEXPORT static int size();
DLLEXPORT static const QoreFunction* find(const char *name);
};
DLLEXPORT extern BuiltinFunctionList builtinFunctions;
#endif // _QORE_BUILTINFUNCTIONLIST_H