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