valuenode_twotone.h

Go to the documentation of this file.
00001 /* === S Y N F I G ========================================================= */
00021 /* ========================================================================= */
00022 
00023 /* === S T A R T =========================================================== */
00024 
00025 #ifndef __SYNFIG_VALUENODE_TWOTONE_H
00026 #define __SYNFIG_VALUENODE_TWOTONE_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 struct ValueNode_TwoTone : public LinkableValueNode
00039 {
00040     typedef etl::handle<ValueNode_TwoTone> Handle;
00041     typedef etl::handle<const ValueNode_TwoTone> ConstHandle;
00042     
00043 protected:
00044 
00045     ValueNode_TwoTone();
00046 
00047 private:
00048 
00049     ValueNode::RHandle ref_a;
00050     ValueNode::RHandle ref_b;
00051 
00052 public:
00053 
00054     virtual ~ValueNode_TwoTone();
00055 
00056 //  static Handle create(ValueBase::Type id=ValueBase::TYPE_GRADIENT);
00057 
00059     bool set_lhs(ValueNode::Handle a);
00060 
00062     ValueNode::Handle get_lhs()const { return ref_a; }
00063 
00065     bool set_rhs(ValueNode::Handle b);
00066 
00068     ValueNode::Handle get_rhs()const { return ref_b; }
00069 
00070 
00071     virtual bool set_link_vfunc(int i,ValueNode::Handle x);
00072 
00073     virtual ValueNode::LooseHandle get_link_vfunc(int i)const;
00074 
00075     virtual int link_count()const;
00076 
00077     virtual String link_local_name(int i)const;
00078     virtual String link_name(int i)const;
00079     virtual int get_link_index_from_name(const String &name)const;
00080 
00081     virtual ValueBase operator()(Time t)const;
00082 
00083     virtual String get_name()const;
00084     virtual String get_local_name()const;
00085 
00086 //  static bool check_type(const ValueBase::Type &type);
00087 
00088     LinkableValueNode* create_new()const;
00089 
00090 public:
00091     using synfig::LinkableValueNode::get_link_vfunc;
00092 
00093     using synfig::LinkableValueNode::set_link_vfunc;
00094     static bool check_type(ValueBase::Type type);
00095     static ValueNode_TwoTone* create(const ValueBase &x=ValueBase::TYPE_GRADIENT);
00096 }; // END of class ValueNode_TwoTone
00097 
00098 }; // END of namespace synfig
00099 
00100 /* === E N D =============================================================== */
00101 
00102 #endif

Generated on Fri Jun 23 15:20:50 2006 for synfig by  doxygen 1.4.6