/****************************************************************************
	Kalkulon - A programmable calculator for programmers

	This file is part of the Kalkulon core.
	
	If you find this source code useful, your are encouraged to use it in your own projects.
	Please give me credit!

	COPYRIGHT by Juergen Holetzeck 2003 - 2008
	e-mail:		contact@kalkulon.de
	homepage:	www.kalkulon.de
****************************************************************************/



#if !defined(FNLIST_INTERNAL__INCLUDED_)
#define FNLIST_INTERNAL__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <string>
#include "DataObject.h"

namespace Kalkulon{
class CRPNStackEval; // forward declaration to avoid mutual includes

/////////////////////////////////////////////////////////////////////
// internal function prototypes
//
// BEWARE: prototype must fit exactly!
//
// defines FP_xxx must have the following values 0xFNNAA
// where AA the number of arguments (for EVAL types n-1 !!!)
// the whole number must be unique so NN could be an incrementing index

typedef double (* fp_string) (std::string);
#define FP_STRING 0xF0101

typedef double (* fp_string_string) (std::string, std::string);
#define FP_STRING_STRING 0xF0102

typedef DataObject (* do_fp_eval_do) (CRPNStackEval *, const DataObject&);
#define DO_FP_EVAL_DO 0xF0201

typedef DataObject (* do_fp_eval_do_do) (CRPNStackEval *, const DataObject&, const DataObject&);
#define DO_FP_EVAL_DO_DO 0xF0202

typedef DataObject (* do_fp_eval_do_do_do) (CRPNStackEval *, const DataObject&, const DataObject&, const DataObject&);
#define DO_FP_EVAL_DO_DO_DO 0xF0203

typedef DataObject (* do_fp_eval_do_do_do_do) (CRPNStackEval *, const DataObject&, const DataObject&, const DataObject&, const DataObject&);
#define DO_FP_EVAL_DO_DO_DO_DO 0xF0204

typedef double (* fp_eval_string) (CRPNStackEval *, std::string);
#define FP_EVAL_STRING 0xF0301

typedef DataObject (* do_fp_eval) (CRPNStackEval *);
#define DO_FP_EVAL 0xF0400

typedef DataObject (* do_fp_eval_string) (CRPNStackEval *, std::string);
#define DO_FP_EVAL_STRING 0xF0401

typedef double (* fp_eval) (CRPNStackEval *);
#define FP_EVAL 0xF0500

typedef double (* fp_do) (const DataObject&);
#define FP_DO 0xF0601

typedef DataObject (* do_fp_do) (const DataObject&);
#define DO_FP_DO 0xF0701

typedef DataObject (* do_fp_do_do) (const DataObject&, const DataObject&);
#define DO_FP_DO_DO 0xF0702

typedef DataObject (* do_fp_do_do_do) (const DataObject&, const DataObject&, const DataObject&);
#define DO_FP_DO_DO_DO 0xF0703

typedef std::string (* string_fp_void) (void);
#define STRING_FP_VOID 0xF0800

typedef std::string (* string_fp_string) (std::string);
#define STRING_FP_STRING 0xF0801

typedef std::string (* string_fp_string_do) (std::string, const DataObject&);
#define STRING_FP_STRING_DO 0xF0902
}


#endif
