SHAPER  9.12.0
XAO::DoubleStep Class Reference

Step with double values. More...

Inheritance diagram for XAO::DoubleStep:
Inheritance graph

Public Member Functions

 DoubleStep (int step, int stamp, int nbElements, int nbComponents)
 Constructor. More...
 
virtual XAO::Type getType ()
 Gets the type of the step. More...
 
std::vector< double > getValues ()
 Gets all the values of the step as a list. More...
 
std::vector< double > getElement (int element)
 Gets all the values for a given element. More...
 
std::vector< double > getComponent (int component)
 Gets all the values for a given component. More...
 
double getValue (int element, int component)
 Gets the value for an element and a component. More...
 
void setValues (const std::vector< double > &values)
 Sets all the values from a list. More...
 
void setElement (int element, const std::vector< double > &elements)
 Sets the values for an element. More...
 
void setComponent (int component, const std::vector< double > &components)
 Sets the values for a component. More...
 
void setValue (int element, int component, double 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...
 
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...
 

Protected Member Functions

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

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...
 

Detailed Description

Step with double values.

Constructor & Destructor Documentation

◆ DoubleStep()

DoubleStep::DoubleStep ( int  step,
int  stamp,
int  nbElements,
int  nbComponents 
)

Constructor.

Parameters
stepthe step number.
stampthe stamp of the step.
nbElementsthe number elements of the geometry.
nbComponentsthe number of components of the field.

Member Function Documentation

◆ getType()

virtual XAO::Type XAO::DoubleStep::getType ( )
inlinevirtual

Gets the type of the step.

Returns

Implements XAO::Step.

◆ getValues()

std::vector< double > DoubleStep::getValues ( )

Gets all the values of the step as a list.

Returns
a vector containing all the values of the step.

◆ getElement()

std::vector< double > DoubleStep::getElement ( int  element)

Gets all the values for a given element.

Parameters
elementthe index of the element.
Returns
a vector containing all the values for the given element.

◆ getComponent()

std::vector< double > DoubleStep::getComponent ( int  component)

Gets all the values for a given component.

Parameters
componentthe index of the component.
Returns
a vector containing all the values for the given component.

◆ getValue()

double DoubleStep::getValue ( int  element,
int  component 
)

Gets the value for an element and a component.

Parameters
elementthe index of the element.
componentthe index of the component.
Returns
the value for the given element and component.

◆ setValues()

void DoubleStep::setValues ( const std::vector< double > &  values)

Sets all the values from a list.

Parameters
valuesthe list of values to set.

◆ setElement()

void DoubleStep::setElement ( int  element,
const std::vector< double > &  elements 
)

Sets the values for an element.

Parameters
elementthe index of the element to set.
elementsthe values to set.

◆ setComponent()

void DoubleStep::setComponent ( int  component,
const std::vector< double > &  components 
)

Sets the values for a component.

Parameters
componentthe index of the component to set.
componentsthe values to set.

◆ setValue()

void DoubleStep::setValue ( int  element,
int  component,
double  value 
)

Sets the value for an element and a component.

Parameters
elementthe index of the element.
componentthe index of the component.
valuethe value.

◆ getStringValue()

const std::string DoubleStep::getStringValue ( int  element,
int  component 
)
virtual

Gets a value as a string.

Parameters
elementthe index of the element.
componentthe index of the component.
Returns
the value as a string.

Implements XAO::Step.

◆ setStringValue()

void DoubleStep::setStringValue ( int  element,
int  component,
const std::string &  value 
)
virtual

Sets a value as a string.

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.

◆ getStep()

int XAO::Step::getStep ( )
inlineinherited

Gets the step index.

Returns
the index of the step.

◆ setStep()

void XAO::Step::setStep ( int  step)
inlineinherited

Sets the number of the step.

Parameters
stepthe index to set.

◆ getStamp()

int XAO::Step::getStamp ( )
inlineinherited

Gets the stamp of the index.

Returns
the stamp of the index.

◆ setStamp()

void XAO::Step::setStamp ( int  stamp)
inlineinherited

Sets the stamp of the index.

Parameters
stampthe stamp to set.

◆ countComponents()

int XAO::Step::countComponents ( )
inlineinherited

Gets the number of components of the step.

Returns
the number of components.

◆ countElements()

int XAO::Step::countElements ( )
inlineinherited

Gets the number of elements for the step.

Returns
the number of elements.

◆ countValues()

int XAO::Step::countValues ( )
inlineinherited

Gets the number of values for the step.

Returns
the number of values.

◆ checkElementIndex()

void Step::checkElementIndex ( int  element)
protectedinherited

Checks that given element index is in the range of element indexes.

Parameters
elementthe index to check.

◆ checkComponentIndex()

void Step::checkComponentIndex ( int  component)
protectedinherited

Checks that given component index is in the range of component indexes.

Parameters
componentthe index to check.

◆ checkNbElements()

void Step::checkNbElements ( int  nbElements)
protectedinherited

Checks that the given number of elements is correct.

Parameters
nbElementsthe number of elements to check.

◆ checkNbComponents()

void Step::checkNbComponents ( int  nbComponents)
protectedinherited

Checks that the given number of components is correct.

Parameters
nbComponentsthe number of components to check.

◆ checkNbValues()

void Step::checkNbValues ( int  nbValues)
protectedinherited

checks that the given number of values is correct.

Parameters
nbValuesthe number of values to check.

Field Documentation

◆ m_step

int XAO::Step::m_step
protectedinherited

the index of the step.

◆ m_stamp

int XAO::Step::m_stamp
protectedinherited

The stamp of the step.

◆ m_nbComponents

int XAO::Step::m_nbComponents
protectedinherited

The number of components.

◆ m_nbElements

int XAO::Step::m_nbElements
protectedinherited

The number of elements.