Version: 9.12.0
XAO::StringStep Class Reference

Step with strings values.

#include <XAO_StringStep.hxx>

Inheritance diagram for XAO::StringStep:
Inheritance graph

Public Member Functions

 StringStep (int step, int stamp, int nbElements, int nbComponents)
 Constructor. More...
 
virtual XAO::Type getType ()
 Gets the type of the step. More...
 
std::vector< std::string > getValues ()
 Gets all the values of the step as a list. More...
 
std::vector< std::string > getElement (int element)
 Gets all the values for a given element. More...
 
std::vector< std::string > getComponent (int component)
 Gets all the values for a given component. More...
 
const std::string getValue (int element, int component)
 Gets the value for an element and a component. More...
 
void setValues (const std::vector< std::string > &values)
 Sets all the values from a list. More...
 
void setElement (int element, const std::vector< std::string > &elements)
 Sets the values for an element. More...
 
void setComponent (int component, const std::vector< std::string > &components)
 Sets the values for a component. More...
 
void setValue (int element, int component, const std::string &value)
 Sets the value for an element and a component. More...
 
virtual const std::string getStringValue (int element, int component)
 Gets a value as a string. More...
 
virtual void setStringValue (int element, int component, const std::string &value)
 Sets a value as a string. More...
 
- Public Member Functions inherited from XAO::Step
virtual ~Step ()
 Destructor. More...
 
int getStep ()
 Gets the step index. More...
 
void setStep (int step)
 Sets the number of the step. More...
 
int getStamp ()
 Gets the stamp of the index. More...
 
void setStamp (int stamp)
 Sets the stamp of the index. More...
 
int countComponents ()
 Gets the number of components of the step. More...
 
int countElements ()
 Gets the number of elements for the step. More...
 
int countValues ()
 Gets the number of values for the step. More...
 

Private Attributes

std::vector< std::vector< std::string > > m_values
 

Additional Inherited Members

- Protected Member Functions inherited from XAO::Step
 Step ()
 Default constructor. More...
 
void checkElementIndex (int element)
 Checks that given element index is in the range of element indexes. More...
 
void checkComponentIndex (int component)
 Checks that given component index is in the range of component indexes. More...
 
void checkNbElements (int nbElements)
 Checks that the given number of elements is correct. More...
 
void checkNbComponents (int nbComponents)
 Checks that the given number of components is correct. More...
 
void checkNbValues (int nbValues)
 checks that the given number of values is correct. More...
 
- Protected Attributes inherited from XAO::Step
int m_step
 the index of the step. More...
 
int m_stamp
 The stamp of the step. More...
 
int m_nbComponents
 The number of components. More...
 
int m_nbElements
 The number of elements. More...
 

Constructor & Destructor Documentation

◆ StringStep()

StringStep::StringStep ( int  step,
int  stamp,
int  nbElements,
int  nbComponents 
)
Parameters
stepthe step number.
stampthe stamp of the step.
nbElementsthe number elements of the geometry.
nbComponentsthe number of components of the field.

References XAO::Step::m_nbComponents, XAO::Step::m_nbElements, XAO::Step::m_stamp, XAO::Step::m_step, and m_values.

Member Function Documentation

◆ getComponent()

std::vector< std::string > StringStep::getComponent ( int  component)
Parameters
componentthe index of the component.
Returns
a vector containing all the values for the given component.

References XAO::Step::checkComponentIndex(), XAO::Step::m_nbElements, and m_values.

◆ getElement()

std::vector< std::string > StringStep::getElement ( int  element)
Parameters
elementthe index of the element.
Returns
a vector containing all the values for the given element.

References XAO::Step::checkElementIndex(), and m_values.

◆ getStringValue()

const std::string StringStep::getStringValue ( int  element,
int  component 
)
virtual
Parameters
elementthe index of the element.
componentthe index of the component.
Returns
the value as a string.

Implements XAO::Step.

References getValue().

◆ getType()

virtual XAO::Type XAO::StringStep::getType ( )
inlinevirtual
Returns

Implements XAO::Step.

References XAO::STRING.

◆ getValue()

const std::string StringStep::getValue ( int  element,
int  component 
)
Parameters
elementthe index of the element.
componentthe index of the component.
Returns
the value for the given element and component.

References XAO::Step::checkComponentIndex(), XAO::Step::checkElementIndex(), and m_values.

◆ getValues()

std::vector< std::string > StringStep::getValues ( )
Returns
a vector containing all the values of the step.

References XAO::Step::m_nbComponents, XAO::Step::m_nbElements, and m_values.

◆ setComponent()

void StringStep::setComponent ( int  component,
const std::vector< std::string > &  components 
)
Parameters
componentthe index of the component to set.
componentsthe values to set.

References XAO::Step::checkElementIndex(), XAO::Step::checkNbElements(), XAO::Step::m_nbElements, and m_values.

◆ setElement()

void StringStep::setElement ( int  element,
const std::vector< std::string > &  elements 
)
Parameters
elementthe index of the element to set.
elementsthe values to set.

References XAO::Step::checkElementIndex(), XAO::Step::checkNbComponents(), XAO::Step::m_nbComponents, and m_values.

◆ setStringValue()

void StringStep::setStringValue ( int  element,
int  component,
const std::string &  value 
)
virtual
Parameters
elementthe index of the element.
componentthe index of the component.
valuethe string value.
Exceptions
XAO_Exceptionif the value is not valid.

Implements XAO::Step.

References setValue().

◆ setValue()

void StringStep::setValue ( int  element,
int  component,
const std::string &  value 
)
Parameters
elementthe index of the element.
componentthe index of the component.
valuethe value.

References XAO::Step::checkComponentIndex(), XAO::Step::checkElementIndex(), and m_values.

◆ setValues()

void StringStep::setValues ( const std::vector< std::string > &  values)
Parameters
valuesthe list of values to set.

References XAO::Step::checkNbValues(), XAO::Step::m_nbComponents, XAO::Step::m_nbElements, and m_values.

Member Data Documentation

◆ m_values

std::vector< std::vector<std::string> > XAO::StringStep::m_values
private

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