#include <value.h>
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> | |
ValueBase & | operator= (const T &x) |
ValueBase & | operator= (const ValueBase &x) |
bool | operator== (const ValueBase &rhs) const |
bool | operator!= (const ValueBase &rhs) const |
const ValueBase & | operator[] (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 Type & | get_type () const |
Returns the type of the contained value. | |
template<class T> | |
bool | same_type_as (const T &x) const |
Checks the type of the parameter against itself. Returns true if they are of the same type. | |
bool | same_type_as (const Type testtype) const |
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> | |
operator std::list< T > () const | |
template<class T> | |
operator std::vector< T > () 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 > &) |
template<class T> | |
static const Type | get_type (const std::list< T > &) |
static const Type | get_type (const Angle &) |
Protected Attributes | |
Type | type |
void * | data |
etl::reference_counter | ref_count |
bool | loop_ |
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. |
ValueBase::ValueBase | ( | ) |
synfig::ValueBase::ValueBase | ( | const T & | x, | |
bool | loop_ = false | |||
) | [inline] |
ValueBase::~ValueBase | ( | ) |
ValueBase& synfig::ValueBase::operator= | ( | const T & | x | ) | [inline] |
bool ValueBase::operator== | ( | const ValueBase & | rhs | ) | const |
bool synfig::ValueBase::operator!= | ( | const ValueBase & | rhs | ) | const [inline] |
const ValueBase& synfig::ValueBase::operator[] | ( | int | index | ) | const [inline] |
Constant index operator for when value is of type TYPE_LIST.
void ValueBase::clear | ( | ) |
bool synfig::ValueBase::get_loop | ( | ) | const [inline] |
void synfig::ValueBase::set_loop | ( | bool | x | ) | [inline] |
bool ValueBase::empty | ( | ) | const |
ValueBase::Type ValueBase::get_contained_type | ( | ) | const |
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.
bool synfig::ValueBase::same_type_as | ( | const T & | x | ) | const [inline] |
Checks the type of the parameter against itself. Returns true if they are of the same type.
bool synfig::ValueBase::same_type_as | ( | const Type | testtype | ) | const [inline] |
const T& synfig::ValueBase::get | ( | const T & | x | ) | const [inline] |
float synfig::ValueBase::get | ( | const float & | ) | const [inline] |
const char * ValueBase::get | ( | const char * | ) | const |
const list_type& synfig::ValueBase::get_list | ( | ) | const [inline] |
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 |
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 | ) |
void synfig::ValueBase::set | ( | const std::vector< T > & | x | ) | [inline] |
void synfig::ValueBase::set | ( | const std::list< T > & | x | ) | [inline] |
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 float & | ) | [inline, static] |
static const Type synfig::ValueBase::get_type | ( | const BLinePoint & | ) | [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] |
static const Type synfig::ValueBase::get_type | ( | const std::vector< T > & | ) | [inline, static] |
static const Type synfig::ValueBase::get_type | ( | const std::list< T > & | ) | [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] |
synfig::ValueBase::operator std::list< T > | ( | ) | const [inline] |
synfig::ValueBase::operator std::vector< T > | ( | ) | const [inline] |
Type synfig::ValueBase::type [protected] |
void* synfig::ValueBase::data [protected] |
etl::reference_counter synfig::ValueBase::ref_count [protected] |
bool synfig::ValueBase::loop_ [protected] |