synfig::ValueBase Class Reference

#include <value.h>

Inheritance diagram for synfig::ValueBase:

synfig::Value< T >

List of all members.

Public Types

enum  Type {
  TYPE_NIL = 0, TYPE_BOOL, TYPE_INTEGER, TYPE_ANGLE,
  TYPE_TIME, TYPE_REAL, TYPE_VECTOR, TYPE_COLOR,
  TYPE_SEGMENT, TYPE_BLINEPOINT, TYPE_LIST, TYPE_CANVAS,
  TYPE_STRING, TYPE_GRADIENT, TYPE_END
}

Public Member Functions

 ValueBase ()
template<typename T>
 ValueBase (const T &x, bool loop_=false)
 ValueBase (Type x)
 ~ValueBase ()
template<class T>
ValueBaseoperator= (const T &x)
ValueBaseoperator= (const ValueBase &x)
bool operator== (const ValueBase &rhs) const
bool operator!= (const ValueBase &rhs) const
const ValueBaseoperator[] (int index) const
 Constant index operator for when value is of type TYPE_LIST.
void clear ()
bool get_loop () const
void set_loop (bool x)
bool empty () const
Type get_contained_type () const
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.
const Typeget_type () const
 Returns the type of the contained value.
template<class T>
bool same_as (const T &x) const
 Checks the type of the parameter against itself. Returns true if they are of the same type.
template<typename T>
const T & get (const T &x) const
float get (const float &) const
etl::loose_handle
< Canvas
get (const etl::handle< Canvas > &) const
etl::loose_handle
< Canvas
get (Canvas *) const
const char * get (const char *) const
const list_type & get_list () const
template<typename T>
void put (T *x) const
void put (float *x) const
void put (char **x) const
template<typename T>
void set (const T &x)
void set (const float &x)
void set (const list_type &x)
void set (const char *x)
void set (Canvas *x)
void set (etl::loose_handle< Canvas > x)
void set (etl::handle< Canvas > x)
template<class T>
void set (const std::vector< T > &x)
template<class T>
void set (const std::list< T > &x)
 operator const list_type & () const
 operator const Vector & () const
 operator const BLinePoint & () const
 operator const Segment & () const
 operator const Angle & () const
template<class T>
 o () const
template<class T>
 o () const

Static Public Member Functions

static String type_name (Type id)
 Returns a string containing the name of the given Type.
static Type ident_type (const String &str)
 Returns a the corresponding Type of the described type.
static const Type get_type (bool)
static const Type get_type (int)
static const Type get_type (const Time &)
static const Type get_type (const Real &)
static const Type get_type (const float &)
static const Type get_type (const Vector &)
static const Type get_type (const Color &)
static const Type get_type (const Segment &)
static const Type get_type (const BLinePoint &)
static const Type get_type (const String &)
static const Type get_type (const Gradient &)
static const Type get_type (Canvas *)
static const Type get_type (const etl::handle< Canvas > &)
static const Type get_type (const etl::loose_handle< Canvas > &)
static const Type get_type (const list_type &)
template<class T>
static const Type get_type (const std::vector< T > &x)
template<class T>
static const Type get_type (const std::list< T > &x)
static const Type get_type (const Angle &)

Protected Attributes

Type type
void * data
etl::reference_counter ref_count
bool loop_


Detailed Description

Todo:
writeme

Member Enumeration Documentation

enum synfig::ValueBase::Type

Todo:
This needs to be documented further.
Enumerator:
TYPE_NIL  Represents an empty value.
TYPE_BOOL 
TYPE_INTEGER 
TYPE_ANGLE  Angle.
TYPE_TIME  Time.
TYPE_REAL  Real.
TYPE_VECTOR  Vector.
TYPE_COLOR  Color.
TYPE_SEGMENT  Segment.
TYPE_BLINEPOINT  BLinePoint.
TYPE_LIST  List.
TYPE_CANVAS  Canvas.
TYPE_STRING  String.
TYPE_GRADIENT  Color Gradient.
TYPE_END  Not a valid type, used for sanity checks.


Constructor & Destructor Documentation

ValueBase::ValueBase (  ) 

Todo:
This needs to be documented further.

template<typename T>
synfig::ValueBase::ValueBase ( const T &  x,
bool  loop_ = false 
) [inline]

Todo:
This needs to be documented further.

ValueBase::ValueBase ( Type  x  ) 

Todo:
This needs to be documented further.

ValueBase::~ValueBase (  ) 

Todo:
This needs to be documented further.


Member Function Documentation

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

Todo:
This needs to be documented further.

Reimplemented in synfig::Value< T >.

ValueBase & ValueBase::operator= ( const ValueBase x  ) 

Todo:
This needs to be documented further.

Reimplemented in synfig::Value< T >.

bool ValueBase::operator== ( const ValueBase rhs  )  const

Todo:
This needs to be documented further.

bool synfig::ValueBase::operator!= ( const ValueBase rhs  )  const [inline]

Todo:
This needs to be documented further.

const ValueBase& synfig::ValueBase::operator[] ( int  index  )  const [inline]

Constant index operator for when value is of type TYPE_LIST.

void ValueBase::clear (  ) 

Todo:
This needs to be documented further.

bool synfig::ValueBase::get_loop (  )  const [inline]

Todo:
This needs to be documented further.

void synfig::ValueBase::set_loop ( bool  x  )  [inline]

Todo:
This needs to be documented further.

bool ValueBase::empty (  )  const

Todo:
This needs to be documented further.

ValueBase::Type ValueBase::get_contained_type (  )  const

Todo:
This needs to be documented further.

bool ValueBase::is_valid (  )  const

Returns true if the contained value is defined and valid.

String synfig::ValueBase::type_name (  )  const [inline]

Returns a string containing the name of the type.

const Type& synfig::ValueBase::get_type (  )  const [inline]

Returns the type of the contained value.

template<class T>
bool synfig::ValueBase::same_as ( const T &  x  )  const [inline]

Checks the type of the parameter against itself. Returns true if they are of the same type.

template<typename T>
const T& synfig::ValueBase::get ( const T &  x  )  const [inline]

float synfig::ValueBase::get ( const float &   )  const [inline]

etl::loose_handle<Canvas> synfig::ValueBase::get ( const etl::handle< Canvas > &   )  const [inline]

etl::loose_handle<Canvas> synfig::ValueBase::get ( Canvas  )  const [inline]

const char * ValueBase::get ( const char *   )  const

const list_type& synfig::ValueBase::get_list (  )  const [inline]

template<typename T>
void synfig::ValueBase::put ( T *  x  )  const [inline]

Reimplemented in synfig::Value< T >.

void synfig::ValueBase::put ( float *  x  )  const [inline]

void synfig::ValueBase::put ( char **  x  )  const

template<typename T>
void synfig::ValueBase::set ( const T &  x  )  [inline]

Reimplemented in synfig::Value< T >.

void synfig::ValueBase::set ( const float &  x  )  [inline]

void ValueBase::set ( const list_type &  x  ) 

void ValueBase::set ( const char *  x  ) 

void ValueBase::set ( Canvas x  ) 

void ValueBase::set ( etl::loose_handle< Canvas x  ) 

void ValueBase::set ( etl::handle< Canvas x  ) 

template<class T>
void synfig::ValueBase::set ( const std::vector< T > &  x  )  [inline]

template<class T>
void synfig::ValueBase::set ( const std::list< T > &  x  )  [inline]

String ValueBase::type_name ( Type  id  )  [static]

Returns a string containing the name of the given Type.

ValueBase::Type ValueBase::ident_type ( const String str  )  [static]

Returns a the corresponding Type of the described type.

static const Type synfig::ValueBase::get_type ( bool   )  [inline, static]

static const Type synfig::ValueBase::get_type ( int   )  [inline, static]

static const Type synfig::ValueBase::get_type ( const Time  )  [inline, static]

static const Type synfig::ValueBase::get_type ( const Real  )  [inline, static]

static const Type synfig::ValueBase::get_type ( const float &   )  [inline, static]

static const Type synfig::ValueBase::get_type ( const Vector  )  [inline, static]

static const Type synfig::ValueBase::get_type ( const Color  )  [inline, static]

static const Type synfig::ValueBase::get_type ( const Segment  )  [inline, static]

static const Type synfig::ValueBase::get_type ( const BLinePoint  )  [inline, static]

static const Type synfig::ValueBase::get_type ( const String  )  [inline, static]

static const Type synfig::ValueBase::get_type ( const Gradient  )  [inline, static]

static const Type synfig::ValueBase::get_type ( Canvas  )  [inline, static]

static const Type synfig::ValueBase::get_type ( const etl::handle< Canvas > &   )  [inline, static]

static const Type synfig::ValueBase::get_type ( const etl::loose_handle< Canvas > &   )  [inline, static]

static const Type synfig::ValueBase::get_type ( const list_type &   )  [inline, static]

template<class T>
static const Type synfig::ValueBase::get_type ( const std::vector< T > &  x  )  [inline, static]

template<class T>
static const Type synfig::ValueBase::get_type ( const std::list< T > &  x  )  [inline, static]

synfig::ValueBase::operator const list_type & (  )  const [inline]

synfig::ValueBase::operator const Vector & (  )  const [inline]

synfig::ValueBase::operator const BLinePoint & (  )  const [inline]

synfig::ValueBase::operator const Segment & (  )  const [inline]

synfig::ValueBase::operator const Angle & (  )  const [inline]

static const Type synfig::ValueBase::get_type ( const Angle  )  [inline, static]

template<class T>
synfig::ValueBase::o (  )  const [inline]

template<class T>
synfig::ValueBase::o (  )  const [inline]


Member Data Documentation

Type synfig::ValueBase::type [protected]

void* synfig::ValueBase::data [protected]

etl::reference_counter synfig::ValueBase::ref_count [protected]

bool synfig::ValueBase::loop_ [protected]


The documentation for this class was generated from the following files:
Generated on Wed Aug 15 05:00:24 2007 for synfig by  doxygen 1.5.3