20 #ifndef __pbd_properties_h__
21 #define __pbd_properties_h__
92 operator T
const &()
const {
96 T
const&
val ()
const {
186 virtual std::string
to_string (T
const& v)
const = 0;
187 virtual T
from_string (std::string
const& s)
const = 0;
201 std::ostream & operator<<(std::ostream& os, PropertyTemplate<T>
const& s)
203 return os << s.val ();
231 XMLNodeList::const_iterator i = children.begin();
232 while (i != children.end() && (*i)->name() != this->
property_name()) {
236 if (i == children.end()) {
275 std::stringstream t (s);
385 if (children.size() != 1) {
445 operator bool ()
const {
std::string to_string(std::string const &v) const
void apply_changes(PropertyBase const *p)
const std::string & value() const
Property(PropertyDescriptor< T > q, Property< T > const &v)
virtual std::string to_string(T const &v) const =0
friend class PropertyFactory
const XMLNodeList & children(const std::string &str=std::string()) const
SharedStatefulProperty(PropertyID d, Ptr o, Ptr c)
Property< T > * clone_from_xml(const XMLNode &node) const
XMLNode * add_child(const char *)
PropertyTemplate(PropertyDescriptor< T > p, T const &v)
bool set_value(XMLNode const &node)
Property(PropertyDescriptor< T > q, T const &o, T const &c)
virtual PropertyBase * clone() const =0
void get_changes_as_properties(PropertyList &changes, Command *) const
std::list< XMLNode * > XMLNodeList
T & operator=(T const &v)
PropertyID property_id() const
Property< std::string > * clone() const
static int current_state_version
void apply_changes(PropertyBase const *p)
XMLProperty * property(const char *)
#define string_2_enum(str, e)
T & operator+=(T const &v)
void get_changes_as_properties(PropertyList &changes, Command *) const
void get_changes_as_xml(XMLNode *history_node) const
T & operator=(T const &v)
PropertyTemplate(PropertyDescriptor< T > p, PropertyTemplate< T > const &s)
std::string from_string(std::string const &s) const
void get_value(XMLNode &node) const
Property(PropertyDescriptor< std::string > d, std::string const &v)
Property(PropertyDescriptor< std::string > d, std::string const &o, std::string const &c)
bool set_value(XMLNode const &node)
XMLProperty * add_property(const char *name, const std::string &value)
bool operator!=(const T &other) const
void add_child_nocopy(XMLNode &)
const gchar * property_name() const
PropertyTemplate(PropertyDescriptor< T > p, T const &o, T const &c)
void get_value(XMLNode &node) const
virtual T from_string(std::string const &s) const
EnumProperty(PropertyDescriptor< T > q, T const &v)
void swap(shared_ptr< T > &other)
XMLNode * child(const char *) const
virtual std::string to_string(T const &v) const
std::string to_string(T const &v) const
T & operator=(T const &v)
Property(PropertyDescriptor< T > q, T const &v)
void get_changes_as_xml(XMLNode *history_node) const
boost::shared_ptr< T > Ptr
bool add(PropertyBase *prop)
virtual T from_string(std::string const &s) const =0
SharedStatefulProperty< T > & operator=(SharedStatefulProperty< T > const &)
bool operator==(const T &other) const
SharedStatefulProperty(PropertyID d, Ptr p)
Property< T > * clone() const
T from_string(std::string const &s) const