30 lines
551 B
Plaintext
30 lines
551 B
Plaintext
// Copyright (C) 2010, Guy Barrand. All rights reserved.
|
|
// See the file tools.license for terms.
|
|
|
|
#ifndef tools_ival_func
|
|
#define tools_ival_func
|
|
|
|
#include "value"
|
|
|
|
namespace tools {
|
|
|
|
class ival_func {
|
|
public:
|
|
virtual ~ival_func() {}
|
|
public:
|
|
virtual void* cast(const std::string&) const = 0;
|
|
public:
|
|
virtual const std::string& name() const = 0;
|
|
virtual size_t number_of_arguments() const = 0;
|
|
typedef std::vector<value> args;
|
|
virtual bool eval(const args&,value&,std::string&) = 0;
|
|
virtual ival_func* copy() const = 0;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|