Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
Teuchos::LabeledObject Class Reference

Base class for objects that contain a std::string label. More...

#include <Teuchos_LabeledObject.hpp>

Inheritance diagram for Teuchos::LabeledObject:
Teuchos::Describable Teuchos::Comm< int > Teuchos::Comm< Ordinal > Teuchos::Comm< OrdinalType > Teuchos::CommRequest< OrdinalType > Teuchos::Condition Teuchos::ConditionXMLConverter Teuchos::ConstHandle< PointerType > Teuchos::Dependency Teuchos::DependencyXMLConverter Teuchos::FunctionObject Teuchos::FunctionObjectXMLConverter Teuchos::ParameterEntryValidator Teuchos::ParameterEntryXMLConverter Teuchos::ParameterListModifier Teuchos::Polynomial< CoeffT > Teuchos::ReferenceTypeReductionOp< Ordinal, T > Teuchos::UnitTestBase Teuchos::ValidatorXMLConverter Teuchos::ValueTypeReductionOp< Ordinal, T > Teuchos::ValueTypeReductionOp< Ordinal, char > Teuchos::ValueTypeReductionOp< Ordinal, Packet > Teuchos::ValueTypeReductionOp< Ordinal, std::pair< double, int > > Teuchos::ValueTypeReductionOp< Ordinal, std::pair< ScalarType, IndexType > >

Public Member Functions

 LabeledObject ()
 Construct with an empty label. More...
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 Set the object label (see LabeledObject). More...
 
virtual std::string getObjectLabel () const
 Get the object label (see LabeledObject). More...
 

Detailed Description

Base class for objects that contain a std::string label.

The object label std::string objectLabel set in setObjectLabel() should be a simple one-line label given to an object to differentiate it from all other objects. A subclass implementation can define a default label in some cases but typically this label is designed for end users to set to give the object a name that is meaningful to the user. The label should not contain any information about the actual type of the object. Adding type information is appropriate in the Describable interface, which inherits from this interface.

This base class provides a default implementation for the functions setObjectLabel() and getObjectLabel() as well as private data to hold the label. Subclasses can override these functions but general, there should be no need to do so.

Definition at line 37 of file Teuchos_LabeledObject.hpp.

Constructor & Destructor Documentation

Teuchos::LabeledObject::LabeledObject ( )

Construct with an empty label.

Definition at line 16 of file Teuchos_LabeledObject.cpp.

Teuchos::LabeledObject::~LabeledObject ( )
virtual

Definition at line 21 of file Teuchos_LabeledObject.cpp.

Member Function Documentation

void Teuchos::LabeledObject::setObjectLabel ( const std::string &  objectLabel)
virtual

Set the object label (see LabeledObject).

Definition at line 25 of file Teuchos_LabeledObject.cpp.

std::string Teuchos::LabeledObject::getObjectLabel ( ) const
virtual

Get the object label (see LabeledObject).

Definition at line 31 of file Teuchos_LabeledObject.cpp.


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