Public Member Functions
rviz::FailureProperty Class Reference
Inheritance diagram for rviz::FailureProperty:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual PropertysubProp (const QString &sub_name)
 Return the first child Property with the given name, or the FailureProperty if no child has the name.

Detailed Description

Definition at line 44 of file property.cpp.


Member Function Documentation

virtual Property* rviz::FailureProperty::subProp ( const QString &  sub_name) [inline, virtual]

Return the first child Property with the given name, or the FailureProperty if no child has the name.

If no child is found with the given name, an instance of a special Property subclass named FailureProperty is returned and an error message is printed to stdout. FailureProperty::subProp() always returns itself, which means you can safely chain a bunch of subProp() calls together and not have a crash even if one of the sub-properties does not actually exist. For instance:

float width = prop->subProp( "Dimenshons" )->subProp( "Width" )->getValue().toFloat();

If the first property prop has a "Dimensions" property but not a "Dimenshons" one, width will end up set to 0 and an error message will be printed, but the program will not crash here.

This is an Order(N) operation in the number of subproperties.

Reimplemented from rviz::Property.

Definition at line 47 of file property.cpp.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Thu Aug 27 2015 15:02:28