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

Generic class to manipulate a list of topologic element.

#include <XAO_GeometricElement.hxx>

Public Types

typedef std::map< int,
GeometricElement >::iterator 
iterator
 Iterator on the element of the list. More...
 

Public Member Functions

 GeometricElementList ()
 Default constructor. More...
 
 GeometricElementList (const int &nb)
 Constructor with size. More...
 
virtual ~GeometricElementList ()
 Destructor. More...
 
const int getSize () const
 Gets the size of the list. More...
 
void setSize (const int &nb)
 Sets the size of the list. More...
 
void setElement (const int &index, const std::string &name, const std::string &reference) throw (XAO_Exception)
 Sets the name and the reference of an element. More...
 
const std::string getName (const int &index) throw (XAO_Exception)
 Gets the name of an element. More...
 
void setName (const int &index, const std::string &name) throw (XAO_Exception)
 Sets the name of an element. More...
 
const bool hasName (const int &index) throw (XAO_Exception)
 Checks if an element has a name. More...
 
const std::string getReference (const int &index) throw (XAO_Exception)
 Gets the reference of an element. More...
 
void setReference (const int &index, const std::string &reference) throw (XAO_Exception)
 Sets the reference of an element. More...
 
const int getIndexByReference (const std::string &reference) throw (XAO_Exception)
 Gets the index of an element using its reference. More...
 
iterator begin ()
 Gets an iterator on the first element. More...
 
iterator end ()
 Gets an iterator on the last element. More...
 

Private Member Functions

void checkElementIndex (const int &index) const throw (XAO_Exception)
 

Private Attributes

int m_count
 
std::map< int, GeometricElementm_elements
 

Member Typedef Documentation

Constructor & Destructor Documentation

GeometricElementList::GeometricElementList ( )

References setSize().

GeometricElementList::GeometricElementList ( const int &  nb)
Parameters
nbthe size to set.

References setSize().

virtual XAO::GeometricElementList::~GeometricElementList ( )
inlinevirtual

Member Function Documentation

iterator XAO::GeometricElementList::begin ( )
inline
Returns
an iterator on the first element.
void GeometricElementList::checkElementIndex ( const int &  index) const throw (XAO_Exception)
private
iterator XAO::GeometricElementList::end ( )
inline
Returns
an iterator on the last element.
const int GeometricElementList::getIndexByReference ( const std::string &  reference) throw (XAO_Exception)
Parameters
referencethe searched reference.
Returns
the index of the element or -1 if no element found.
const std::string GeometricElementList::getName ( const int &  index) throw (XAO_Exception)
Parameters
indexthe index of the element to set.
Returns
the name of the element with the given index.
Exceptions
XAO_Exceptionif index is bigger than the size of the list.
const std::string GeometricElementList::getReference ( const int &  index) throw (XAO_Exception)
Parameters
indexthe index of the element.
Returns
the reference of the element.
Exceptions
XAO_Exceptionif index is bigger than the size of the list.
const int XAO::GeometricElementList::getSize ( ) const
inline
Returns
the size of the list.
const bool GeometricElementList::hasName ( const int &  index) throw (XAO_Exception)
Parameters
indexthe index of the element.
Returns
true if the element has a name, false otherwise.
void GeometricElementList::setElement ( const int &  index,
const std::string &  name,
const std::string &  reference 
) throw (XAO_Exception)
Parameters
indexthe index of the element to set.
namethe name to set.
referencethe reference to set.
Exceptions
XAO_Exceptionif index is bigger than the size of the list.
void GeometricElementList::setName ( const int &  index,
const std::string &  name 
) throw (XAO_Exception)
Parameters
indexthe index of the element.
namethe name to set.
Exceptions
XAO_Exceptionif index is bigger than the size of the list.
void GeometricElementList::setReference ( const int &  index,
const std::string &  reference 
) throw (XAO_Exception)
Parameters
indexthe index of the element to set.
referencethe reference to set.
Exceptions
XAO_Exceptionif index is bigger than the size of the list.
void GeometricElementList::setSize ( const int &  nb)
Parameters
nbthe size to set.
Warning
the list will be cleared.

References m_count, and m_elements.

Member Data Documentation

int XAO::GeometricElementList::m_count
private
std::map<int, GeometricElement> XAO::GeometricElementList::m_elements
private

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