- Main Page
- Related Pages
- Namespaces
- Classes
- Files

# valuelink.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_VALUELINK_H
    00026 #define __SYNFIG_VALUELINK_H
    00027
    00028 /* === H E A D E R S ======================================================= */
    00029 #include <synfig/valuenode.h>
    00030
    00031 /* === M A C R O S ========================================================= */
    00032
    00033 /* === T Y P E D E F S ===================================================== */
    00034
    00035 /* === C L A S S E S & S T R U C T S ======================================= */
    00036
    00037 namespace studio {
    00038
    00039 /* NOTE: DO NOT USE THE INDEX BASED INTERFACE... THINGS WILL CHANGE
    00040 */
    00041 class ValueBaseLink : public synfig::LinkableValueNode
    00042 {
    00043     typedef std::vector<ValueNode::Handle> list_type;
    00044     list_type   list;
    00045
    00046 protected:
    00047     //stuff I don't want
    00048     virtual bool set_link_vfunc(int /*i*/,synfig::ValueNode::Handle /*x*/) {return false;}
    00049     virtual LinkableValueNode* create_new()const {return 0;}
    00050
    00051     //new stuff I need
    00052     list_type::const_iterator findlink(synfig::ValueNode::Handle x) const;
    00053     list_type::iterator findlink(synfig::ValueNode::Handle x);
    00054
    00055 public: //linkable interface
    00056
    00057     //stuff I do want
    00058     virtual synfig::ValueNode::LooseHandle get_link_vfunc(int i)const;
    00059     virtual int link_count()const;
    00060
    00061     //I have to support the thing because it's too much work otherwise
    00062     virtual synfig::String link_local_name(int i)const;
    00063     virtual synfig::String link_name(int i)const;
    00064
    00065 public:
    00066     ValueBaseLink();
    00067     virtual ~ValueBaseLink();
    00068
    00069     //don't want
    00070     virtual int get_link_index_from_name(const synfig::String &name)const;
    00071
    00072     //new add and subtract stuff
    00073     virtual void add(synfig::ValueNode::Handle v);
    00074     virtual void remove(synfig::ValueNode::Handle v);
    00075
    00076 };
    00077
    00078 }; // END of namespace studio
    00079
    00080 /* === E N D =============================================================== */
    00081
    00082 #endif