00001
00008 #ifndef __INTFUNBASE_H
00009 #define __INTFUNBASE_H
00010
00011 #include <cassert>
00012
00013 #ifndef __NAMEDO_H
00014 #include "jbltools/sfh/NamedO.h"
00015 #endif
00016
00017 class FloatFun;
00018 class FillIterator;
00019
00020
00022
00051 class IntFun: public NamedO {
00052 public:
00053
00055 explicit IntFun (const char *name_ = "?"
00056 )
00057 : NamedO (name_)
00058 {}
00060 explicit IntFun (const std::string& name_
00061 )
00062 : NamedO (name_)
00063 {}
00065 IntFun (const std::string& name_,
00066 const std::string& definition_
00067 )
00068 : NamedO (name_, definition_)
00069 {}
00070
00072 virtual int operator() () const = 0;
00074 virtual FloatFun& Float () const;
00076 virtual void destroy() { delete this; }
00078 virtual const FillIterator *getIterator() const { return 0; }
00079
00081
00085 static IntFun *getObject (const std::string& name
00086 ) {
00087 return NamedO::getObject<IntFun>(name);
00088 }
00089
00091
00095 static IntFun *getObject (const char * name
00096 ) {
00097 return NamedO::getObject<IntFun>(name);
00098 }
00099 protected:
00101 virtual ~IntFun() {};
00102 };
00103 #endif