ardour
Public Member Functions | Private Member Functions | Friends | List of all members
PBD::Property< T > Class Template Reference

#include <properties.h>

Inheritance diagram for PBD::Property< T >:
PBD::PropertyTemplate< T > PBD::PropertyBase PBD::EnumProperty< T >

Public Member Functions

 Property (PropertyDescriptor< T > q, T const &v)
 
 Property (PropertyDescriptor< T > q, T const &o, T const &c)
 
 Property (PropertyDescriptor< T > q, Property< T > const &v)
 
Property< T > * clone () const
 
Property< T > * clone_from_xml (const XMLNode &node) const
 
T & operator= (T const &v)
 
- Public Member Functions inherited from PBD::PropertyTemplate< T >
 PropertyTemplate (PropertyDescriptor< T > p, T const &v)
 
 PropertyTemplate (PropertyDescriptor< T > p, T const &o, T const &c)
 
 PropertyTemplate (PropertyDescriptor< T > p, PropertyTemplate< T > const &s)
 
T & operator= (T const &v)
 
PropertyTemplate< T > & operator= (PropertyTemplate< T > const &p)
 
T & operator+= (T const &v)
 
bool operator== (const T &other) const
 
bool operator!= (const T &other) const
 
 operator T const & () const
 
T const & val () const
 
bool set_value (XMLNode const &node)
 
void get_value (XMLNode &node) const
 
void clear_changes ()
 
bool changed () const
 
void invert ()
 
void get_changes_as_xml (XMLNode *history_node) const
 
void get_changes_as_properties (PropertyList &changes, Command *) const
 
void apply_changes (PropertyBase const *p)
 
- Public Member Functions inherited from PBD::PropertyBase
 PropertyBase (PropertyID pid)
 
virtual ~PropertyBase ()
 
virtual void clear_owned_changes ()
 
virtual void rdiff (std::vector< Command * > &) const
 
const gchar * property_name () const
 
PropertyID property_id () const
 
bool operator== (PropertyID pid) const
 

Private Member Functions

 Property (Property< T > const &)
 
virtual std::string to_string (T const &v) const
 
virtual T from_string (std::string const &s) const
 

Friends

class PropertyFactory
 

Additional Inherited Members

- Protected Member Functions inherited from PBD::PropertyTemplate< T >
void set (T const &v)
 
- Protected Member Functions inherited from PBD::PropertyBase
 PropertyBase (PropertyBase const &b)
 
- Protected Attributes inherited from PBD::PropertyTemplate< T >
bool _have_old
 
_current
 
_old
 

Detailed Description

template<class T>
class PBD::Property< T >

Representation of a single piece of scalar state in a Stateful; for use with types that can be written to / read from stringstreams.

Definition at line 210 of file properties.h.

Constructor & Destructor Documentation

template<class T>
PBD::Property< T >::Property ( PropertyDescriptor< T >  q,
T const &  v 
)
inline

Definition at line 213 of file properties.h.

template<class T>
PBD::Property< T >::Property ( PropertyDescriptor< T >  q,
T const &  o,
T const &  c 
)
inline

Definition at line 217 of file properties.h.

template<class T>
PBD::Property< T >::Property ( PropertyDescriptor< T >  q,
Property< T > const &  v 
)
inline

Definition at line 221 of file properties.h.

template<class T>
PBD::Property< T >::Property ( Property< T > const &  )
private

Member Function Documentation

template<class T>
Property<T>* PBD::Property< T >::clone ( ) const
inlinevirtual

Implements PBD::PropertyBase.

Definition at line 225 of file properties.h.

template<class T>
Property<T>* PBD::Property< T >::clone_from_xml ( const XMLNode ) const
inlinevirtual

Look in an XML node written by get_changes_as_xml and, if XML from this property is found, create a property with the changes from the XML.

Reimplemented from PBD::PropertyBase.

Definition at line 229 of file properties.h.

template<class T>
virtual T PBD::Property< T >::from_string ( std::string const &  s) const
inlineprivatevirtual

Implements PBD::PropertyTemplate< T >.

Reimplemented in PBD::EnumProperty< T >, and PBD::EnumProperty< PositionLockStyle >.

Definition at line 274 of file properties.h.

template<class T>
T& PBD::Property< T >::operator= ( T const &  v)
inline

Definition at line 249 of file properties.h.

template<class T>
virtual std::string PBD::Property< T >::to_string ( T const &  v) const
inlineprivatevirtual

Implements PBD::PropertyTemplate< T >.

Reimplemented in PBD::EnumProperty< T >, and PBD::EnumProperty< PositionLockStyle >.

Definition at line 267 of file properties.h.

Friends And Related Function Documentation

template<class T>
friend class PropertyFactory
friend

Definition at line 255 of file properties.h.


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