1 /* === S I N F G =========================================================== */
2 /*! \file valuenode_animated.h
3 ** \brief Template Header
5 ** $Id: valuenode_animated.h,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SINFG_VALUENODE_ANIMATED_H
25 #define __SINFG_VALUENODE_ANIMATED_H
27 /* === H E A D E R S ======================================================= */
31 #include "valuenode.h"
35 /* === M A C R O S ========================================================= */
37 /* === C L A S S E S & S T R U C T S ======================================= */
41 struct ValueNode_Animated : public ValueNode
44 typedef etl::handle<ValueNode_Animated> Handle;
45 typedef etl::handle<const ValueNode_Animated> ConstHandle;
47 typedef sinfg::Waypoint Waypoint;
48 typedef sinfg::WaypointList WaypointList;
50 typedef std::pair<WaypointList::iterator,bool> findresult;
51 typedef std::pair<WaypointList::const_iterator,bool> const_findresult;
54 WaypointList waypoint_list_;
57 WaypointList &waypoint_list() { return waypoint_list_; }
59 const WaypointList &waypoint_list()const { return waypoint_list_; }
61 virtual WaypointList::iterator new_waypoint(Time t, ValueBase value)=0;
63 virtual WaypointList::iterator new_waypoint(Time t, ValueNode::Handle value_node)=0;
65 /*! \note this does not add any waypoint to the ValueNode! */
66 Waypoint new_waypoint_at_time(const Time& t)const;
68 WaypointList::iterator add(const Waypoint &x);
70 void erase(const UniqueID &x);
72 //either use find result (return bool and iterator) or
73 findresult find_uid(const UniqueID &x);
74 const_findresult find_uid(const UniqueID &x)const;
75 findresult find_time(const Time &x);
76 const_findresult find_time(const Time &x)const;
78 WaypointList::iterator find(const UniqueID &x);
79 WaypointList::const_iterator find(const UniqueID &x)const;
80 WaypointList::iterator find(const Time &x);
81 WaypointList::const_iterator find(const Time &x)const;
83 WaypointList::iterator find_next(const Time &x);
84 WaypointList::const_iterator find_next(const Time &x)const;
85 WaypointList::iterator find_prev(const Time &x);
86 WaypointList::const_iterator find_prev(const Time &x)const;
88 virtual ~ValueNode_Animated();
90 virtual String get_name()const;
91 virtual String get_local_name()const;
93 static Handle create(ValueBase::Type type);
95 static Handle create(const ValueBase& value, const Time& time);
97 static Handle create(ValueNode::Handle value_node, const Time& time);
99 int find(const Time& begin,const Time& end,std::vector<Waypoint*>& list);
101 void insert_time(const Time& location, const Time& delta);
104 ValueNode_Animated();
106 void set_type(ValueBase::Type t);
107 virtual void get_times_vfunc(Node::time_set &set) const;
112 }; // END of namespace sinfg
114 /* === E N D =============================================================== */