Step with strings values.
#include <XAO_StringStep.hxx>
Public Member Functions | |
StringStep (const int &step, const int &stamp, const int &nbElements, const int &nbComponents) | |
Constructor. More... | |
virtual const 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 (const int &element) throw (XAO_Exception) |
Gets all the values for a given element. More... | |
std::vector< std::string > | getComponent (const int &component) throw (XAO_Exception) |
Gets all the values for a given component. More... | |
const std::string | getValue (const int &element, const int &component) throw (XAO_Exception) |
Gets the value for an element and a component. More... | |
void | setValues (const std::vector< std::string > &values) throw (XAO_Exception) |
Sets all the values from a list. More... | |
void | setElement (const int &element, const std::vector< std::string > &elements) throw (XAO_Exception) |
Sets the values for an element. More... | |
void | setComponent (const int &component, const std::vector< std::string > &components) throw (XAO_Exception) |
Sets the values for a component. More... | |
void | setValue (const int &element, const int &component, const std::string &value) throw (XAO_Exception) |
Sets the value for an element and a component. More... | |
virtual const std::string | getStringValue (const int &element, const int &component) throw (XAO_Exception) |
Gets a value as a string. More... | |
virtual void | setStringValue (const int &element, const int &component, const std::string &value) throw (XAO_Exception) |
Sets a value as a string. More... | |
Public Member Functions inherited from XAO::Step | |
virtual | ~Step () |
Destructor. More... | |
const int | getStep () |
Gets the step index. More... | |
void | setStep (const int &step) |
Sets the number of the step. More... | |
const int | getStamp () |
Gets the stamp of the index. More... | |
void | setStamp (const int &stamp) |
Sets the stamp of the index. More... | |
const int | countComponents () |
Gets the number of components of the step. More... | |
const int | countElements () |
Gets the number of elements for the step. More... | |
const 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 (const int &element) throw (XAO_Exception) |
Checks that given element index is in the range of element indexes. More... | |
void | checkComponentIndex (const int &component) throw (XAO_Exception) |
Checks that given component index is in the range of component indexes. More... | |
void | checkNbElements (const int &nbElements) throw (XAO_Exception) |
Checks that the given number of elements is correct. More... | |
void | checkNbComponents (const int &nbComponents) throw (XAO_Exception) |
Checks that the given number of components is correct. More... | |
void | checkNbValues (const int &nbValues) throw (XAO_Exception) |
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... | |
StringStep::StringStep | ( | const int & | step, |
const int & | stamp, | ||
const int & | nbElements, | ||
const int & | nbComponents | ||
) |
step | the step number. |
stamp | the stamp of the step. |
nbElements | the number elements of the geometry. |
nbComponents | the 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.
std::vector< std::string > StringStep::getComponent | ( | const int & | component | ) | throw (XAO_Exception) |
component | the index of the component. |
References it().
std::vector< std::string > StringStep::getElement | ( | const int & | element | ) | throw (XAO_Exception) |
element | the index of the element. |
|
virtual |
element | the index of the element. |
component | the index of the component. |
Implements XAO::Step.
|
inlinevirtual |
const std::string StringStep::getValue | ( | const int & | element, |
const int & | component | ||
) | throw (XAO_Exception) |
element | the index of the element. |
component | the index of the component. |
std::vector< std::string > StringStep::getValues | ( | ) |
References it(), XAO::Step::m_nbComponents, XAO::Step::m_nbElements, and m_values.
void StringStep::setComponent | ( | const int & | component, |
const std::vector< std::string > & | components | ||
) | throw (XAO_Exception) |
component | the index of the component to set. |
components | the values to set. |
void StringStep::setElement | ( | const int & | element, |
const std::vector< std::string > & | elements | ||
) | throw (XAO_Exception) |
element | the index of the element to set. |
elements | the values to set. |
|
virtual |
element | the index of the element. |
component | the index of the component. |
value | the string value. |
XAO_Exception | if the value is not valid. |
Implements XAO::Step.
void StringStep::setValue | ( | const int & | element, |
const int & | component, | ||
const std::string & | value | ||
) | throw (XAO_Exception) |
element | the index of the element. |
component | the index of the component. |
value | the value. |
void StringStep::setValues | ( | const std::vector< std::string > & | values | ) | throw (XAO_Exception) |
values | the list of values to set. |
|
private |