Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Teuchos::StringCondition Class Reference

A String Condition is a Parameter Condition that evaluates whether or not a string parameter has taken on a particular value or set of values. More...

#include <Teuchos_StandardConditions.hpp>

Inheritance diagram for Teuchos::StringCondition:
Inheritance graph
[legend]

List of all members.

Public types

typedef Array< std::string > ValueList
 Convience typedef representing an array of strings.

Constructors/Destructor

 StringCondition (RCP< const ParameterEntry > parameter, std::string value)
 Constructs a String Condition.
 StringCondition (RCP< const ParameterEntry > parameter, ValueList values)
 Constructs a String Condition.
virtual ~StringCondition ()

Overridden from Condition

std::string getTypeAttributeValue () const
 Get the value that should be used for the condition type attribute when converting a condition to XML.

Overridden from ParameterCondition

bool evaluateParameter () const

Attribute/Query Functions

const ValueListgetValueList () const
 Returns the value list being used with this StringCondition.

Private Members

ValueList values_
void checkParameterType ()
 Ensures the parameter is the proper type. In this case a string.

Detailed Description

A String Condition is a Parameter Condition that evaluates whether or not a string parameter has taken on a particular value or set of values.

Please see StringConditionConverter for documenation regarding the XML representation of this condition.

Definition at line 144 of file Teuchos_StandardConditions.hpp.


Member Typedef Documentation

Convience typedef representing an array of strings.

Definition at line 154 of file Teuchos_StandardConditions.hpp.


Constructor & Destructor Documentation

Teuchos::StringCondition::StringCondition ( RCP< const ParameterEntry parameter,
std::string  value 
)

Constructs a String Condition.

Parameters:
parameterThe parameter to be evaluated. be evaluated.
valueThe value to compare the parameter's value against.

Definition at line 191 of file Teuchos_StandardConditions.cpp.

Teuchos::StringCondition::StringCondition ( RCP< const ParameterEntry parameter,
ValueList  values 
)

Constructs a String Condition.

Parameters:
parameterThe parameter to be evaluated.
valuesThe list values to compare the parameter's value against.

Definition at line 200 of file Teuchos_StandardConditions.cpp.

virtual Teuchos::StringCondition::~StringCondition ( ) [inline, virtual]

Definition at line 178 of file Teuchos_StandardConditions.hpp.


Member Function Documentation

std::string Teuchos::StringCondition::getTypeAttributeValue ( ) const [inline, virtual]

Get the value that should be used for the condition type attribute when converting a condition to XML.

Implements Teuchos::Condition.

Definition at line 185 of file Teuchos_StandardConditions.hpp.

bool Teuchos::StringCondition::evaluateParameter ( ) const [virtual]

Evaluate the current condition of a parameter and return the result.

Parameters:
Theresult of evaluating the current condition of the parameter.

Implements Teuchos::ParameterCondition.

Definition at line 220 of file Teuchos_StandardConditions.cpp.

const ValueList& Teuchos::StringCondition::getValueList ( ) const [inline]

Returns the value list being used with this StringCondition.

Definition at line 202 of file Teuchos_StandardConditions.hpp.

void Teuchos::StringCondition::checkParameterType ( ) [private]

Ensures the parameter is the proper type. In this case a string.

Definition at line 209 of file Teuchos_StandardConditions.cpp.


Member Data Documentation

A list of values against which to evaluate the parameter's value.

Definition at line 216 of file Teuchos_StandardConditions.hpp.


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