Geant4 Cross Reference |
1 // Copyright (C) 2010, Guy Barrand. All rights 1 // Copyright (C) 2010, Guy Barrand. All rights reserved. 2 // See the file tools.license for terms. 2 // See the file tools.license for terms. 3 3 4 #ifndef tools_ival_func 4 #ifndef tools_ival_func 5 #define tools_ival_func 5 #define tools_ival_func 6 6 7 #include "value" 7 #include "value" 8 8 9 namespace tools { 9 namespace tools { 10 10 11 class ival_func { 11 class ival_func { 12 public: 12 public: 13 virtual ~ival_func() {} 13 virtual ~ival_func() {} 14 public: 14 public: 15 virtual void* cast(const std::string&) const 15 virtual void* cast(const std::string&) const = 0; 16 public: 16 public: 17 virtual const std::string& name() const = 0; 17 virtual const std::string& name() const = 0; 18 virtual size_t number_of_arguments() const = 18 virtual size_t number_of_arguments() const = 0; 19 typedef std::vector<value> args; 19 typedef std::vector<value> args; 20 virtual bool eval(const args&,value&,std::st 20 virtual bool eval(const args&,value&,std::string&) = 0; 21 virtual ival_func* copy() const = 0; 21 virtual ival_func* copy() const = 0; 22 }; 22 }; 23 23 24 } 24 } 25 25 26 #endif 26 #endif 27 27 28 28 29 29