8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-28 02:43:03 +01:00
firebird-mirror/src/jrd/SysFunction.h

73 lines
2.1 KiB
C
Raw Normal View History

2007-04-12 17:56:34 +02:00
/*
* PROGRAM: JRD System Functions
* MODULE: SysFunctions.h
* DESCRIPTION: System Functions
*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
*
* Software distributed under the License is distributed AS IS,
* WITHOUT WARRANTY OF ANY KIND, either express or implied.
* See the License for the specific language governing rights
* and limitations under the License.
*
* The Original Code was created by Adriano dos Santos Fernandes
* for the Firebird Open Source RDBMS project, based on work done
* in Yaffil by Oleg Loa <loa@mail.ru> and Alexey Karyakin <aleksey.karyakin@mail.ru>
*
* Copyright (c) 2007 Adriano dos Santos Fernandes <adrianosf@uol.com.br>
* and all contributors signed below.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
* Oleg Loa <loa@mail.ru>
* Alexey Karyakin <aleksey.karyakin@mail.ru>
*
*/
#ifndef JRD_SYSFUNCTION_H
#define JRD_SYSFUNCTION_H
#include "../common/classes/MetaName.h"
#include "../jrd/DataTypeUtil.h"
#include "../dsql/Nodes.h"
2010-10-12 10:02:57 +02:00
#include "../common/dsc.h"
2007-04-12 17:56:34 +02:00
namespace Jrd
{
class thread_db;
struct impure_value;
}
class SysFunction
{
public:
typedef void (*SetParamsFunc)(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, int, dsc**);
typedef void (*MakeFunc)(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc*, int, const dsc**);
typedef dsc* (*EvlFunc)(Jrd::thread_db*, const SysFunction* function,
const Jrd::NestValueArray&, Jrd::impure_value*);
2007-04-12 17:56:34 +02:00
const Firebird::MetaName name;
int minArgCount;
int maxArgCount; // -1 for no limit
SetParamsFunc setParamsFunc;
2007-04-17 04:24:33 +02:00
MakeFunc makeFunc;
EvlFunc evlFunc;
2007-04-12 17:56:34 +02:00
void* misc;
static const SysFunction* lookup(const Firebird::MetaName& name);
2007-04-12 17:56:34 +02:00
void checkArgsMismatch(int count) const;
2007-04-12 17:56:34 +02:00
private:
const static SysFunction functions[];
2007-04-12 17:56:34 +02:00
};
#endif // JRD_SYSFUNCTION_H