$search
Base class for properties. More...
#include <property.h>
Public Types | |
typedef boost::function< T(void)> | Getter |
typedef boost::function< void(const T &)> | Setter |
Public Member Functions | |
virtual void | addLegacyName (const std::string &name) |
T | get () |
Get the current value. | |
virtual std::string | getName () |
Get the name of this property. | |
virtual CategoryPropertyWPtr | getParent () |
virtual wxPGProperty * | getPGProperty () |
Get the wxPGProperty associated with this property. | |
virtual std::string | getPrefix () |
Get the prefix of this property. | |
bool | getSave () |
Returns whether or not this property should be saved to disk. | |
void * | getUserData () |
Get the user data associated with this property. | |
bool | hasGetter () |
bool | hasSetter () |
Property (const std::string &name, const std::string &prefix, const CategoryPropertyWPtr &parent, const Getter &getter, const Setter &setter) | |
Constructor. | |
void | set (const T &val) |
Set the value of this property. | |
virtual void | setHelpText (const std::string &text) |
virtual void | setPrefix (const std::string &prefix) |
void | setSave (bool save) |
Set whether we should save this property to disk or not. | |
virtual void | setToDisabled () |
virtual void | setToError () |
virtual void | setToOK () |
virtual void | setToWarn () |
void | setUserData (void *user_data) |
Set the user data associated with this property. | |
virtual | ~Property () |
Protected Types | |
typedef std::vector< wxString > | V_wxString |
Protected Attributes | |
std::string | help_text_ |
V_wxString | legacy_names_ |
wxString | name_ |
CategoryPropertyWPtr | parent_ |
wxString | prefix_ |
bool | save_ |
void * | user_data_ |
Private Attributes | |
Getter | getter_ |
Setter | setter_ |
Base class for properties.
The Property (and PropertyManager) interfaces abstract away the various things that must be done with properties, such as setting/getting the value in a wxPropertyGrid, saving the property to disk, etc. Every property references a Getter and Setter, which it uses to get and set the value. Properties should not be created directly, rather they should be created through the PropertyManager class.
Definition at line 221 of file property.h.
typedef boost::function<T (void)> rviz::Property< T >::Getter |
Definition at line 224 of file property.h.
typedef boost::function<void (const T&)> rviz::Property< T >::Setter |
Definition at line 225 of file property.h.
typedef std::vector<wxString> rviz::Property< T >::V_wxString [protected] |
Definition at line 371 of file property.h.
rviz::Property< T >::Property | ( | const std::string & | name, | |
const std::string & | prefix, | |||
const CategoryPropertyWPtr & | parent, | |||
const Getter & | getter, | |||
const Setter & | setter | |||
) | [inline] |
Constructor.
name | Name of this property (eg, "Color") | |
prefix | Prefix for this property (eg, "Head Laser Scan") | |
grid | The wxPropertyGrid to use | |
parent | The parent to put this property under | |
getter | Getter function/method. See boost::function and boost::bind for more information | |
setter | Setter function/method. See boost::function and boost::bind for more information |
Definition at line 239 of file property.h.
virtual rviz::Property< T >::~Property | ( | ) | [inline, virtual] |
Destructor
Definition at line 257 of file property.h.
virtual void rviz::Property< T >::addLegacyName | ( | const std::string & | name | ) | [inline, virtual] |
Implements rviz::PropertyBase.
Definition at line 325 of file property.h.
T rviz::Property< T >::get | ( | ) | [inline] |
virtual std::string rviz::Property< T >::getName | ( | void | ) | [inline, virtual] |
Get the name of this property.
Implements rviz::PropertyBase.
Definition at line 294 of file property.h.
virtual CategoryPropertyWPtr rviz::Property< T >::getParent | ( | ) | [inline, virtual] |
Implements rviz::PropertyBase.
Definition at line 323 of file property.h.
virtual wxPGProperty* rviz::Property< T >::getPGProperty | ( | ) | [inline, virtual] |
Get the wxPGProperty associated with this property.
Implements rviz::PropertyBase.
Definition at line 305 of file property.h.
virtual std::string rviz::Property< T >::getPrefix | ( | ) | [inline, virtual] |
Get the prefix of this property.
Implements rviz::PropertyBase.
Definition at line 299 of file property.h.
bool rviz::Property< T >::getSave | ( | ) | [inline, virtual] |
Returns whether or not this property should be saved to disk.
Implements rviz::PropertyBase.
Definition at line 288 of file property.h.
void* rviz::Property< T >::getUserData | ( | ) | [inline, virtual] |
Get the user data associated with this property.
Implements rviz::PropertyBase.
Definition at line 313 of file property.h.
bool rviz::Property< T >::hasGetter | ( | ) | [inline] |
Definition at line 277 of file property.h.
bool rviz::Property< T >::hasSetter | ( | ) | [inline] |
Definition at line 278 of file property.h.
void rviz::Property< T >::set | ( | const T & | val | ) | [inline] |
Set the value of this property.
val | The value |
Definition at line 270 of file property.h.
virtual void rviz::Property< T >::setHelpText | ( | const std::string & | text | ) | [inline, virtual] |
Definition at line 350 of file property.h.
virtual void rviz::Property< T >::setPrefix | ( | const std::string & | prefix | ) | [inline, virtual] |
Implements rviz::PropertyBase.
Reimplemented in rviz::Vector3Property, and rviz::QuaternionProperty.
Definition at line 356 of file property.h.
void rviz::Property< T >::setSave | ( | bool | save | ) | [inline] |
Set whether we should save this property to disk or not.
save | If true, this property will be saved to disk |
Definition at line 284 of file property.h.
virtual void rviz::Property< T >::setToDisabled | ( | ) | [inline, virtual] |
Reimplemented in rviz::CategoryProperty, rviz::Vector3Property, and rviz::QuaternionProperty.
Definition at line 345 of file property.h.
virtual void rviz::Property< T >::setToError | ( | ) | [inline, virtual] |
Reimplemented in rviz::CategoryProperty, rviz::Vector3Property, and rviz::QuaternionProperty.
Definition at line 330 of file property.h.
virtual void rviz::Property< T >::setToOK | ( | ) | [inline, virtual] |
Reimplemented in rviz::CategoryProperty, rviz::Vector3Property, and rviz::QuaternionProperty.
Definition at line 340 of file property.h.
virtual void rviz::Property< T >::setToWarn | ( | ) | [inline, virtual] |
Reimplemented in rviz::CategoryProperty, rviz::Vector3Property, and rviz::QuaternionProperty.
Definition at line 335 of file property.h.
void rviz::Property< T >::setUserData | ( | void * | user_data | ) | [inline, virtual] |
Set the user data associated with this property.
user_data |
Implements rviz::PropertyBase.
Definition at line 318 of file property.h.
Getter rviz::Property< T >::getter_ [private] |
Definition at line 377 of file property.h.
std::string rviz::Property< T >::help_text_ [protected] |
Definition at line 374 of file property.h.
V_wxString rviz::Property< T >::legacy_names_ [protected] |
Definition at line 372 of file property.h.
wxString rviz::Property< T >::name_ [protected] |
Definition at line 363 of file property.h.
CategoryPropertyWPtr rviz::Property< T >::parent_ [protected] |
Definition at line 365 of file property.h.
wxString rviz::Property< T >::prefix_ [protected] |
Definition at line 364 of file property.h.
bool rviz::Property< T >::save_ [protected] |
Definition at line 367 of file property.h.
Setter rviz::Property< T >::setter_ [private] |
Definition at line 378 of file property.h.
void* rviz::Property< T >::user_data_ [protected] |
Definition at line 369 of file property.h.