#ifndef ARBFUNC_H
# define ARBFUNC_H

# ifndef GPK_STD_H
#  include <gpk_std.h>
# endif
#include <stdio.h>


class arbfunc	{
	protected:
	virtual BOOL check_is_ok(double func_result, double check_value) C = 0;

	public:
	virtual ~arbfunc();

	virtual C char *id() C = 0;
	virtual C char *id_check() C = 0;

	virtual char *parse(C char *line) = 0;
	char *read(FILE *fp);
	char *read(C char *fn);

	BOOL write_check(FILE *fp, double x) C;
	virtual BOOL write(FILE *fp) C = 0;

	virtual BOOL all_set() C = 0;	/* Function is ready to be used. */
	virtual void unset() = 0;		/* Newly created and not ready to be used */
	virtual BOOL partial_set() C = 0;	/* typ: partly read in from data file*/
	virtual double operator()(double x) C = 0;

	static C char *C Enotmine;	/* Return from parse() when passed line
								is not relevant to this arbfunc. */
	};

#endif
