Salome HOME
Copyright update 2022
[modules/shaper.git] / src / XAO / XAO_Group.hxx
index 7dfd6f0c57ed2f0148e330dc04227c46d6f7162e..399698a855b7106dbd00a9fb298758b5177f07b6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -44,8 +44,7 @@ namespace XAO
          * @param nbElements the number of geometrical elements for the dimension in the geometry.
          * @param name the name of the group.
          */
-        Group(const XAO::Dimension& dim, const int& nbElements, const std::string& name = std::string(""))
-        throw (XAO_Exception);
+        Group(XAO::Dimension dim, int nbElements, const std::string& name = std::string(""));
 
         /**
          * Destructor.
@@ -73,7 +72,7 @@ namespace XAO
          * Gets the dimension of the group.
          * \return the dimension of the group.
          */
-        const XAO::Dimension getDimension()
+        XAO::Dimension getDimension()
         {
             return m_dimension;
         }
@@ -82,7 +81,7 @@ namespace XAO
          * Gets the numbers of elements in the geometry of the same type than the group.
          * \return the number of elements in the associated geometry.
          */
-        const int getNbElements()
+        int getNbElements()
         {
             return m_nbElements;
         }
@@ -91,9 +90,9 @@ namespace XAO
          * Gets the number of elements in the group.
          * \return the number of elements.
          */
-        const int count() const
+        int count() const
         {
-            return int(m_elements.size());
+            return m_elements.size();
         }
 
         /**
@@ -102,7 +101,7 @@ namespace XAO
          * \return the reference of the element.
          * \note use begin() and end() if you need to iterate.
          */
-        const int get(const int& index)
+        int get(int index)
         {
             checkIndex(index);
             std::set<int>::iterator it = m_elements.begin();
@@ -114,13 +113,13 @@ namespace XAO
          * Adds an element to the group.
          * \param value the index of the element to add.
          */
-        void add(const int& value);
+        void add(int value);
 
         /**
          * Removes an element from the group.
          * \param value the index of the element to remove.
          */
-        void remove(const int& value);
+        void remove(int value);
 
         /**
          * Gets an iterator on the first element in the group.
@@ -140,8 +139,7 @@ namespace XAO
          * @param element
          * @throw XAO_Exception if element is bigger than the number of elements.
          */
-        void checkIndex(const int& element)
-        throw (XAO_Exception);
+        void checkIndex(int element);
 
     private:
         /** The name of the group. */