-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
* Checks if the element has a name.
* @return true if the element has a name, false otherwise.
*/
- const bool hasName();
+ bool hasName();
/**
* Gets the reference of the element.
* Constructor with size.
* \param nb the size to set.
*/
- GeometricElementList(const int& nb);
+ GeometricElementList(int nb);
/**
* Destructor.
* Gets the size of the list.
* \return the size of the list.
*/
- const int getSize() const { return m_count; }
+ int getSize() const { return m_count; }
/**
* Sets the size of the list.
* \param nb the size to set.
* \warning the list will be cleared.
*/
- void setSize(const int& nb);
+ void setSize(int nb);
/**
* Sets the name and the reference of an element.
* \param reference the reference to set.
* \throw XAO_Exception if index is bigger than the size of the list.
*/
- void setElement(const int& index, const std::string& name, const std::string& reference) throw (XAO_Exception);
+ void setElement(int index, const std::string& name, const std::string& reference);
/**
* Gets the name of an element.
* \param index the index of the element to set.
* \return the name of the element with the given index.
* \throw XAO_Exception if index is bigger than the size of the list.
*/
- const std::string getName(const int& index) throw (XAO_Exception);
+ const std::string getName(int index);
/**
* Sets the name of an element.
* \param index the index of the element.
* \param name the name to set.
* \throw XAO_Exception if index is bigger than the size of the list.
*/
- void setName(const int& index, const std::string& name) throw (XAO_Exception);
+ void setName(int index, const std::string& name);
/**
* Checks if an element has a name.
* @param index the index of the element.
* @return true if the element has a name, false otherwise.
*/
- const bool hasName(const int& index) throw (XAO_Exception);
+ bool hasName(int index);
/**
* Gets the reference of an element.
* \return the reference of the element.
* \throw XAO_Exception if index is bigger than the size of the list.
*/
- const std::string getReference(const int& index) throw (XAO_Exception);
+ const std::string getReference(int index);
/**
* Sets the reference of an element.
* \param index the index of the element to set.
* \param reference the reference to set.
* \throw XAO_Exception if index is bigger than the size of the list.
*/
- void setReference(const int& index, const std::string& reference) throw (XAO_Exception);
+ void setReference(int index, const std::string& reference);
/**
* Gets the index of an element using its reference.
* \param reference the searched reference.
* \return the index of the element or -1 if no element found.
*/
- const int getIndexByReference(const std::string& reference) throw (XAO_Exception);
+ int getIndexByReference(const std::string& reference);
/**
* Iterator on the element of the list.
iterator end() { return m_elements.end(); }
private:
- void checkElementIndex(const int& index) const throw (XAO_Exception);
+ void checkElementIndex(int index) const;
private:
int m_count;