synfig-core  1.0.3
Public Member Functions | List of all members
synfig::Value< T > Class Template Reference

Template for all the valid Value Types. More...

#include <value.h>

Inheritance diagram for synfig::Value< T >:
synfig::ValueBase

Public Member Functions

 Value (const T &x)
 Value (const ValueBase &x)
get () const
void put (T *x) const
 Put template for any class.
void set (const T &x)
 Set template for any class.
Value< T > & operator= (const T &x)
Value< T > & operator= (const Value< T > &x)
Value< T > & operator= (const ValueBase &x)
 Operator asignation for ValueBase classes. Does a exact copy of .
- Public Member Functions inherited from synfig::ValueBase
 ValueBase ()
 Default constructor.
template<typename T >
 ValueBase (const T &x, bool loop_=false, bool static_=false)
 Template constructor for any type.
template<typename T >
 ValueBase (const std::vector< T > &x, bool loop_=false, bool static_=false)
 ValueBase (Type &x)
 Copy constructor. The data is not copied, just the type.
 ~ValueBase ()
 Default destructor.
bool operator== (const ValueBase &rhs) const
 Eqaul than operator. Segment, Gradient and Bline Points cannot be compared.
bool operator!= (const ValueBase &rhs) const
 Not equal than operator.
const ValueBaseoperator[] (int index) const
 Constant index operator for when value is of type TYPE_LIST.
void clear ()
 Deletes the data only if the ref count is zero.
bool get_loop () const
 Gets the loop option.
void set_loop (bool x)
 Sets the loop option.
bool get_static () const
 Gets the static option.
void set_static (bool x)
 Sets the static option.
Interpolation get_interpolation () const
 Gets the interpolation.
void set_interpolation (Interpolation x)
 Sets the interpolation.
void copy (const ValueBase &x)
 Create independent copy from existing ValueBase object.
void copy_properties_of (const ValueBase &x)
 Copies properties (static, interpolation, etc) from other ValueBase object.
bool empty () const
 True if the Value is not valid or is type LIST and is empty.
Typeget_contained_type () const
 Gets the contained type in the Value Base.
bool is_valid () const
 Returns true if the contained value is defined and valid.
String type_name () const
 Returns a string containing the name of the type. Used for sif files.
Typeget_type () const
 Returns the type of the contained value.
template<typename T >
bool can_get (const T &x) const
template<typename T >
bool can_set (const T &x) const
template<typename T >
bool can_put (const T &x) const
bool can_copy_from (const TypeId type) const
bool can_copy_from (const Type &type) const
bool can_copy_to (const TypeId type) const
bool can_copy_to (const Type &type) const
template<typename T >
bool same_type_as (const T &x) const
template<typename T >
const T & get (const T &x) const
 Template to get the ValueBase class data by casting the type.
const Listget_list () const
 Gets the data as List Type.
template<typename T >
std::vector< T > get_list_of (const T &x) const
template<typename T >
void set_list_of (const std::vector< T > &list)

Additional Inherited Members

- Public Types inherited from synfig::ValueBase
typedef std::vector< ValueBaseList
- Static Public Member Functions inherited from synfig::ValueBase
template<typename T >
static bool can_get (const TypeId type, const T &x)
template<typename T >
static bool can_get (const Type &type, const T &x)
template<typename T >
static bool can_set (const TypeId type, const T &x)
template<typename T >
static bool can_set (const Type &type, const T &x)
template<typename T >
static bool can_put (const TypeId type, const T &x)
template<typename T >
static bool can_put (const Type &type, const T &x)
static bool can_copy (const TypeId dest, const TypeId src)
static bool can_copy (const Type &dest, const Type &src)
static Typeident_type (const String &str)
template<typename T >
static Typeget_type (const T &)
static Typeget_type (const List &)
static Typeget_type (Canvas *const &)
static Typeget_type (ValueNode_Bone *const &)
template<typename T >
static Typeget_type (const T *&)
template<typename T >
static Typeget_type (const std::vector< T > &)
template<typename T >
static Typeget_type (const std::list< T > &)
- Protected Attributes inherited from synfig::ValueBase
Typetype
 The type of value.
void * data
 Pointer to hold the data of the value.
etl::reference_counter ref_count
bool loop_
 For Values with loop option like TYPE_LIST.
bool static_
 For Values of Constant Value Nodes.
Interpolation interpolation_
 Parameter interpolation.

Detailed Description

template<class T>
class synfig::Value< T >

Template for all the valid Value Types.

Constructor & Destructor Documentation

template<class T>
synfig::Value< T >::Value ( const T &  x)
inline
template<class T>
synfig::Value< T >::Value ( const ValueBase x)
inline

Member Function Documentation

template<class T>
T synfig::Value< T >::get ( ) const
inline
template<class T>
void synfig::Value< T >::put ( T *  x) const
inline

Put template for any class.

Reimplemented from synfig::ValueBase.

template<class T>
void synfig::Value< T >::set ( const T &  x)
inline

Set template for any class.

Reimplemented from synfig::ValueBase.

References synfig::Value< T >::operator=().

template<class T>
Value<T>& synfig::Value< T >::operator= ( const T &  x)
inline

Template for the operator assignation operator for non ValueBase classes

See Also
set()

Reimplemented from synfig::ValueBase.

Referenced by synfig::Value< T >::operator=(), and synfig::Value< T >::set().

template<class T>
Value<T>& synfig::Value< T >::operator= ( const Value< T > &  x)
inline
template<class T>
Value<T>& synfig::Value< T >::operator= ( const ValueBase x)
inline

Operator asignation for ValueBase classes. Does a exact copy of .

Reimplemented from synfig::ValueBase.

References synfig::Value< T >::operator=().


The documentation for this class was generated from the following file: