Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
XAO::BooleanStep Class Reference

Step with boolean values.

#include <XAO_BooleanStep.hxx>

Inheritance diagram for XAO::BooleanStep:
Inheritance graph

Public Member Functions

 BooleanStep (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< bool > getValues ()
 Gets all the values in a vector by elements and by components. More...
 
std::vector< bool > getElement (const int &element) throw (XAO_Exception)
 Gets all the values for an element. More...
 
std::vector< bool > getComponent (const int &component) throw (XAO_Exception)
 Gets all the values for a component. More...
 
const bool getValue (const int &element, const int &component) throw (XAO_Exception)
 Gets a value for an element and a component. More...
 
void setValues (const std::vector< bool > &values) throw (XAO_Exception)
 Sets all the values from a list. More...
 
void setElement (const int &element, const std::vector< bool > &elements) throw (XAO_Exception)
 Sets the values for an element. More...
 
void setComponent (const int &component, const std::vector< bool > &components) throw (XAO_Exception)
 Sets the values for a component. More...
 
void setValue (const int &element, const int &component, const bool &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< bool > > 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...
 

Constructor & Destructor Documentation

BooleanStep::BooleanStep ( const int &  step,
const int &  stamp,
const int &  nbElements,
const 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

std::vector< bool > BooleanStep::getComponent ( const int &  component) throw (XAO_Exception)
Parameters
componentthe index of the component to get.
Returns
a vector containing all the values for the given component.

References it().

std::vector< bool > BooleanStep::getElement ( const int &  element) throw (XAO_Exception)
Parameters
elementthe index of the element to get.
Returns
a vector containing all the values for the given element.
const std::string BooleanStep::getStringValue ( const int &  element,
const int &  component 
) throw (XAO_Exception)
virtual
Parameters
elementthe index of the element.
componentthe index of the component.
Returns
the value as a string.

Implements XAO::Step.

References XAO::XaoUtils::booleanToString().

virtual const XAO::Type XAO::BooleanStep::getType ( )
inlinevirtual
Returns

Implements XAO::Step.

References XAO::BOOLEAN.

const bool BooleanStep::getValue ( const int &  element,
const int &  component 
) throw (XAO_Exception)
Parameters
elementthe index of the element.
componentthe index of the component.
Returns
the value.
std::vector< bool > BooleanStep::getValues ( )
Returns
a vector containing all the values.

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

void BooleanStep::setComponent ( const int &  component,
const std::vector< bool > &  components 
) throw (XAO_Exception)
Parameters
componentthe index of the component to set.
componentsthe values to set.
void BooleanStep::setElement ( const int &  element,
const std::vector< bool > &  elements 
) throw (XAO_Exception)
Parameters
elementthe index of the element to set.
elementsthe values to set.
void BooleanStep::setStringValue ( const int &  element,
const int &  component,
const std::string &  value 
) throw (XAO_Exception)
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 XAO::XaoUtils::stringToBoolean().

void BooleanStep::setValue ( const int &  element,
const int &  component,
const bool &  value 
) throw (XAO_Exception)
Parameters
elementthe index of the element.
componentthe index of the component.
valuethe value.
void BooleanStep::setValues ( const std::vector< bool > &  values) throw (XAO_Exception)
Parameters
valuesthe list of values to set.

Member Data Documentation

std::vector< std::vector<bool> > XAO::BooleanStep::m_values
private

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