SHAPER  9.12.0
XAO::BooleanStep Class Reference

Step with boolean values. More...

Inheritance diagram for XAO::BooleanStep:
Inheritance graph

Public Member Functions

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

Constructor & Destructor Documentation

◆ BooleanStep()

BooleanStep::BooleanStep ( 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::BooleanStep::getType ( )
inlinevirtual

Gets the type of the step.

Returns

Implements XAO::Step.

◆ getValues()

std::vector< bool > BooleanStep::getValues ( )

Gets all the values in a vector by elements and by components.

Returns
a vector containing all the values.

◆ getElement()

std::vector< bool > BooleanStep::getElement ( int  element)

Gets all the values for an element.

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

◆ getComponent()

std::vector< bool > BooleanStep::getComponent ( int  component)

Gets all the values for a component.

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

◆ getValue()

bool BooleanStep::getValue ( int  element,
int  component 
)

Gets a value for an element and a component.

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

◆ setValues()

void BooleanStep::setValues ( const std::vector< bool > &  values)

Sets all the values from a list.

Parameters
valuesthe list of values to set.

◆ setElement()

void BooleanStep::setElement ( int  element,
const std::vector< bool > &  elements 
)

Sets the values for an element.

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

◆ setComponent()

void BooleanStep::setComponent ( int  component,
const std::vector< bool > &  components 
)

Sets the values for a component.

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

◆ setValue()

void BooleanStep::setValue ( int  element,
int  component,
bool  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 BooleanStep::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 BooleanStep::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.