00001 /* === S Y N F I G ========================================================= */ 00022 /* ========================================================================= */ 00023 00024 /* === S T A R T =========================================================== */ 00025 00026 #ifndef __SYNFIG_VALUENODE_SWITCH_H 00027 #define __SYNFIG_VALUENODE_SWITCH_H 00028 00029 /* === H E A D E R S ======================================================= */ 00030 00031 #include "valuenode.h" 00032 00033 /* === M A C R O S ========================================================= */ 00034 00035 /* === C L A S S E S & S T R U C T S ======================================= */ 00036 00037 namespace synfig { 00038 00039 class ValueNode_Switch : public LinkableValueNode 00040 { 00041 ValueNode::RHandle link_off_; 00042 ValueNode::RHandle link_on_; 00043 ValueNode::RHandle switch_; 00044 public: 00045 typedef etl::handle<ValueNode_Switch> Handle; 00046 typedef etl::handle<const ValueNode_Switch> ConstHandle; 00047 00048 ValueNode_Switch(const ValueBase::Type &x); 00049 00050 ValueNode_Switch(const ValueNode::Handle &x); 00051 00052 // static Handle create(const ValueBase::Type &x); 00053 // static Handle create(const ValueNode::Handle &x); 00054 00055 00056 virtual ValueNode::LooseHandle get_link_vfunc(int i)const; 00057 00058 virtual int link_count()const; 00059 00060 virtual String link_name(int i)const; 00061 00062 virtual String link_local_name(int i)const; 00063 virtual int get_link_index_from_name(const String &name)const; 00064 00065 virtual ValueBase operator()(Time t)const; 00066 00067 virtual ~ValueNode_Switch(); 00068 00069 virtual String get_name()const; 00070 00071 virtual String get_local_name()const; 00072 00073 protected: 00074 virtual bool set_link_vfunc(int i,ValueNode::Handle x); 00075 00076 LinkableValueNode* create_new()const; 00077 00078 public: 00079 using synfig::LinkableValueNode::set_link_vfunc; 00080 static bool check_type(ValueBase::Type type); 00081 static ValueNode_Switch* create(const ValueBase &x); 00082 }; // END of class ValueNode_Switch 00083 00084 }; // END of namespace synfig 00085 00086 /* === E N D =============================================================== */ 00087 00088 #endif