vee_operator_list.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 /* COPYRIGHT
00004  *
00005  * This file is part of the Visual Effects Engine - VEE
00006  *
00007  * Read the "VEE-LICENSE" file for the license.
00008  *
00009  * Authors & Copyright:   
00010  *
00011  * Tommi Ilmonen, Tuukka Heikura, Marko Myllymaa and 
00012  * Janne Kontkanen 2001-2004
00013  *
00014  * Additional copyrights: Tekes 2003-2004
00015  *
00016  * firstname.lastname@hut.fi
00017  *
00018  */
00019 
00020 #ifndef VEE_OPERATOR_LIST_H
00021 #define VEE_OPERATOR_LIST_H
00022 
00023 #include <vector>
00024 #include <string>
00025 
00026 class VEE_Object;
00027 class VEE_Operator;
00028 class VEE_Value;
00029 
00030 class VEE_OperatorList
00031 {
00032 public:
00033   VEE_OperatorList();
00034   VEE_OperatorList(const VEE_OperatorList &l) { *this = l; }
00035   ~VEE_OperatorList();
00036   
00037   void appendOperator(VEE_Operator *o, const char * name = 0);
00038   void appendOperator2(VEE_Object *, VEE_Operator *o, const char * name = 0);
00039   bool removeOperator(const char *name, bool alsoDelete = true);
00040 
00041   void operate(VEE_Object *, float);
00042   void operate2(float);
00043   void clear();
00044 
00045   bool setValue(const char *name, VEE_Value *);
00046 
00047   VEE_Operator *get(int);
00048 
00049   VEE_OperatorList & operator = (const VEE_OperatorList &);
00050 
00051   uint size() const { return m_operators.size(); }
00052 
00053 protected:
00054 
00055   class Holder {
00056   public:
00057     
00058     VEE_Operator *oper() { return m_operator; }
00059 
00060     std::string   m_name;
00061     VEE_Operator *m_operator;
00062     VEE_Object   *m_target;
00063   };
00064 
00065   std::vector<Holder> m_operators;
00066   typedef std::vector<Holder>::iterator holderIter_t;
00067 
00068 };
00069 
00070 #endif

Generated on Mon Mar 12 21:09:01 2007 for VEE - The Visual Effects Engine by  doxygen 1.4.6