Ardour  9.0-pre0-582-g084a23a80d
PBD::Property< T > Class Template Reference

#include <properties.h>

Inheritance diagram for PBD::Property< T >:
[legend]

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)
 
Property< T > & operator= (Property< 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)
 
operator- (T const other) const
 
bool operator< (T const &other) const
 
bool operator> (T const &other) const
 
bool operator== (const T &other) const
 
bool operator!= (const T &other) const
 
 operator T const & () const
 
T const & val () const
 
T & non_const_val ()
 
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_change (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< PBD::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 226 of file properties.h.

Constructor & Destructor Documentation

◆ Property() [1/4]

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

Definition at line 229 of file properties.h.

◆ Property() [2/4]

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

Definition at line 233 of file properties.h.

◆ Property() [3/4]

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

Definition at line 237 of file properties.h.

◆ Property() [4/4]

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

Member Function Documentation

◆ clone()

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

Implements PBD::PropertyBase.

Definition at line 241 of file properties.h.

◆ clone_from_xml()

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 245 of file properties.h.

◆ from_string()

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 >.

Definition at line 292 of file properties.h.

◆ operator=() [1/2]

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

Definition at line 270 of file properties.h.

◆ operator=() [2/2]

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

Definition at line 265 of file properties.h.

◆ to_string()

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 >.

Definition at line 288 of file properties.h.

Friends And Related Function Documentation

◆ PropertyFactory

template<class T >
friend class PropertyFactory
friend

Definition at line 276 of file properties.h.


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