ardour
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
PBD::PropertyTemplate< T > Class Template Referenceabstract

#include <properties.h>

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

Public Member Functions

 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
 
virtual PropertyBaseclone_from_xml (const XMLNode &) const
 
virtual PropertyBaseclone () const =0
 
const gchar * property_name () const
 
PropertyID property_id () const
 
bool operator== (PropertyID pid) const
 

Protected Member Functions

void set (T const &v)
 
virtual std::string to_string (T const &v) const =0
 
virtual T from_string (std::string const &s) const =0
 
- Protected Member Functions inherited from PBD::PropertyBase
 PropertyBase (PropertyBase const &b)
 

Protected Attributes

bool _have_old
 
_current
 
_old
 

Private Member Functions

 PropertyTemplate (PropertyTemplate< T > const &)
 

Detailed Description

template<class T>
class PBD::PropertyTemplate< T >

Parent class for classes which represent a single scalar property in a Stateful object

Definition at line 40 of file properties.h.

Constructor & Destructor Documentation

template<class T>
PBD::PropertyTemplate< T >::PropertyTemplate ( PropertyDescriptor< T >  p,
T const &  v 
)
inline

Definition at line 43 of file properties.h.

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

Definition at line 49 of file properties.h.

template<class T>
PBD::PropertyTemplate< T >::PropertyTemplate ( PropertyDescriptor< T >  p,
PropertyTemplate< T > const &  s 
)
inline

Definition at line 56 of file properties.h.

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

Member Function Documentation

template<class T>
void PBD::PropertyTemplate< T >::apply_changes ( PropertyBase const *  )
inlinevirtual

Set this property's current state from another

Implements PBD::PropertyBase.

Definition at line 156 of file properties.h.

template<class T>
bool PBD::PropertyTemplate< T >::changed ( ) const
inlinevirtual
Returns
true if this property has changed in value since construction or since the last call to clear_changes (), whichever was more recent.

Implements PBD::PropertyBase.

Definition at line 130 of file properties.h.

template<class T>
void PBD::PropertyTemplate< T >::clear_changes ( )
inlinevirtual

Forget about any old changes to this property's value

Implements PBD::PropertyBase.

Definition at line 126 of file properties.h.

template<class T>
virtual T PBD::PropertyTemplate< T >::from_string ( std::string const &  s) const
protectedpure virtual
template<class T>
void PBD::PropertyTemplate< T >::get_changes_as_properties ( PropertyList changes,
Command  
) const
inlinevirtual

If this Property has changed, clone it and add it to a given list. Used for making StatefulDiffCommands.

Implements PBD::PropertyBase.

Definition at line 147 of file properties.h.

template<class T>
void PBD::PropertyTemplate< T >::get_changes_as_xml ( XMLNode ) const
inlinevirtual

Get any changes in this property as XML and add them to a StatefulDiffCommand node.

Implements PBD::PropertyBase.

Definition at line 141 of file properties.h.

template<class T>
void PBD::PropertyTemplate< T >::get_value ( XMLNode node) const
inlinevirtual

Get this property's value and put it into a Stateful node

Implements PBD::PropertyBase.

Definition at line 119 of file properties.h.

template<class T>
void PBD::PropertyTemplate< T >::invert ( )
inlinevirtual

Invert the changes in this property

Implements PBD::PropertyBase.

Definition at line 132 of file properties.h.

template<class T>
PBD::PropertyTemplate< T >::operator T const & ( ) const
inline

Definition at line 92 of file properties.h.

template<class T>
bool PBD::PropertyTemplate< T >::operator!= ( const T &  other) const
inline

Definition at line 88 of file properties.h.

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

Definition at line 79 of file properties.h.

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

Definition at line 65 of file properties.h.

template<class T>
PropertyTemplate<T>& PBD::PropertyTemplate< T >::operator= ( PropertyTemplate< T > const &  p)
inline

Definition at line 74 of file properties.h.

template<class T>
bool PBD::PropertyTemplate< T >::operator== ( const T &  other) const
inline

Definition at line 84 of file properties.h.

template<class T>
void PBD::PropertyTemplate< T >::set ( T const &  v)
inlineprotected

Definition at line 165 of file properties.h.

template<class T>
bool PBD::PropertyTemplate< T >::set_value ( XMLNode const &  )
inlinevirtual

Set the value of this property from a Stateful node.

Returns
true if the value was set.

Implements PBD::PropertyBase.

Definition at line 103 of file properties.h.

template<class T>
virtual std::string PBD::PropertyTemplate< T >::to_string ( T const &  v) const
protectedpure virtual
template<class T>
T const& PBD::PropertyTemplate< T >::val ( ) const
inline

Definition at line 96 of file properties.h.

Member Data Documentation

template<class T>
T PBD::PropertyTemplate< T >::_current
protected

Definition at line 190 of file properties.h.

template<class T>
bool PBD::PropertyTemplate< T >::_have_old
protected

Definition at line 189 of file properties.h.

template<class T>
T PBD::PropertyTemplate< T >::_old
protected

Definition at line 191 of file properties.h.


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