StkOpRepository.h

00001 #ifndef gridripper_math_expr_StkOpRepository_h
00002 #define gridripper_math_expr_StkOpRepository_h
00003 
00004 #include "StkOp.h"
00005 #include <gridripper/tvector.h>
00006 
00007 namespace gridripper { namespace math { namespace expr {
00008 
00016 class StkOpRepository
00017 {
00018 private:
00019     tvector<StkOp*> funcs;
00020     bool ownsFuncs;
00021 
00022 public:
00026     StkOpRepository();
00027 
00033     StkOpRepository(bool ownsFuncs);
00034 
00038     virtual ~StkOpRepository();
00039 
00044     void add(StkOp* f);
00045 
00049     StkOp* find(const string& name) const;
00050 
00054     int prec(const string& name) const;
00055 
00060     int size() const {
00061         return funcs.size();
00062     }
00063 
00069     StkOp* getFunc(int i) const {
00070         return funcs[i];
00071     }
00072 
00077     tvector<StkOp*> getVector() const { return funcs; }
00078 };
00079 
00080 } } } /* namespace gridripper::math::expr */
00081 
00082 #endif /* gridripper_math_expr_StkOpRepository_h */

Generated on Wed Jun 17 18:46:47 2009 for GridRipper by  doxygen 1.5.6