$search

rviz::Property< T > Class Template Reference

Base class for properties. More...

#include <property.h>

Inheritance diagram for rviz::Property< T >:
Inheritance graph
[legend]

List of all members.

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)
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_

Detailed Description

template<typename T>
class rviz::Property< T >

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.


Member Typedef Documentation

template<typename T>
typedef boost::function<T (void)> rviz::Property< T >::Getter

Definition at line 224 of file property.h.

template<typename T>
typedef boost::function<void (const T&)> rviz::Property< T >::Setter

Definition at line 225 of file property.h.

template<typename T>
typedef std::vector<wxString> rviz::Property< T >::V_wxString [protected]

Definition at line 371 of file property.h.


Constructor & Destructor Documentation

template<typename T>
rviz::Property< T >::Property ( const std::string &  name,
const std::string &  prefix,
const CategoryPropertyWPtr &  parent,
const Getter getter,
const Setter setter 
) [inline]

Constructor.

Parameters:
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
Returns:

Definition at line 239 of file property.h.

template<typename T>
virtual rviz::Property< T >::~Property (  )  [inline, virtual]

Destructor

Definition at line 257 of file property.h.


Member Function Documentation

template<typename T>
virtual void rviz::Property< T >::addLegacyName ( const std::string &  name  )  [inline, virtual]

Implements rviz::PropertyBase.

Definition at line 325 of file property.h.

template<typename T>
T rviz::Property< T >::get (  )  [inline]

Get the current value.

Returns:
The current value

Definition at line 265 of file property.h.

template<typename T>
virtual std::string rviz::Property< T >::getName ( void   )  [inline, virtual]

Get the name of this property.

Returns:
The name of this property

Implements rviz::PropertyBase.

Definition at line 294 of file property.h.

template<typename T>
virtual CategoryPropertyWPtr rviz::Property< T >::getParent (  )  [inline, virtual]

Implements rviz::PropertyBase.

Definition at line 323 of file property.h.

template<typename T>
virtual wxPGProperty* rviz::Property< T >::getPGProperty (  )  [inline, virtual]

Get the wxPGProperty associated with this property.

Returns:
The wxPGProperty

Implements rviz::PropertyBase.

Definition at line 305 of file property.h.

template<typename T>
virtual std::string rviz::Property< T >::getPrefix (  )  [inline, virtual]

Get the prefix of this property.

Returns:
The prefix of this property

Implements rviz::PropertyBase.

Definition at line 299 of file property.h.

template<typename T>
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.

template<typename T>
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.

template<typename T>
bool rviz::Property< T >::hasGetter (  )  [inline]

Definition at line 277 of file property.h.

template<typename T>
bool rviz::Property< T >::hasSetter (  )  [inline]

Definition at line 278 of file property.h.

template<typename T>
void rviz::Property< T >::set ( const T &  val  )  [inline]

Set the value of this property.

Parameters:
val The value

Definition at line 270 of file property.h.

template<typename T>
virtual void rviz::Property< T >::setHelpText ( const std::string &  text  )  [inline, virtual]

Definition at line 350 of file property.h.

template<typename T>
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.

template<typename T>
void rviz::Property< T >::setSave ( bool  save  )  [inline]

Set whether we should save this property to disk or not.

Parameters:
save If true, this property will be saved to disk

Definition at line 284 of file property.h.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
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.

template<typename T>
void rviz::Property< T >::setUserData ( void *  user_data  )  [inline, virtual]

Set the user data associated with this property.

Parameters:
user_data 

Implements rviz::PropertyBase.

Definition at line 318 of file property.h.


Member Data Documentation

template<typename T>
Getter rviz::Property< T >::getter_ [private]

Definition at line 377 of file property.h.

template<typename T>
std::string rviz::Property< T >::help_text_ [protected]

Definition at line 374 of file property.h.

template<typename T>
V_wxString rviz::Property< T >::legacy_names_ [protected]

Definition at line 372 of file property.h.

template<typename T>
wxString rviz::Property< T >::name_ [protected]

Definition at line 363 of file property.h.

template<typename T>
CategoryPropertyWPtr rviz::Property< T >::parent_ [protected]

Definition at line 365 of file property.h.

template<typename T>
wxString rviz::Property< T >::prefix_ [protected]

Definition at line 364 of file property.h.

template<typename T>
bool rviz::Property< T >::save_ [protected]

Definition at line 367 of file property.h.

template<typename T>
Setter rviz::Property< T >::setter_ [private]

Definition at line 378 of file property.h.

template<typename T>
void* rviz::Property< T >::user_data_ [protected]

Definition at line 369 of file property.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


rviz
Author(s): Josh Faust, Dave Hershberger
autogenerated on Sat Mar 2 14:17:36 2013