Salome HOME
Updated copyright comment
[modules/hexablock.git] / src / HEXABLOCK / HexGroup.hxx
old mode 100755 (executable)
new mode 100644 (file)
index e75315b..fa353b0
@@ -1,12 +1,12 @@
 
 // Class : Implementation des groupes
 
-// Copyright (C) 2009-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 #ifndef __GROUP_H
 #define __GROUP_H
 
-#include "hexa_base.hxx"
+#include "HexEltBase.hxx"
 
 BEGIN_NAMESPACE_HEXA
 
-class Group 
+class HexaExport Group : public EltBase 
 {
 public :
-   Group (cpchar nom, EnumGroup grp);
-  ~Group ()                   {}
-
-   void      setName (cpchar nom)          { grp_name = nom ; }
-   cpchar    getName ()                    { return grp_name.c_str () ; }
-   char* getNextName  (pchar buffer);
-   EnumGroup getKind ()                    { return grp_kind ; }
    int       addElement    (EltBase* elt);
-   int       removeElement (EltBase* elt);
-   int       findElement   (EltBase* elt);
-   int       removeElement (int nro);
-   EltBase*  getElement    (int nro)       { return grp_table [nro] ; }
    int       countElement  ()              { return grp_table.size () ; }
+   EnumGroup getKind ()                    { return grp_kind ; }
+   int       removeElement (int nro);
    void      clearElement  ()              { grp_table.clear () ; }
+   int       removeElement (EltBase* elt);
+   EltBase*  getElement    (int nro)       { return grp_table [nro] ; }
 
+   Group (Document* dad, cpchar nom, EnumGroup grp);
+#ifndef SWIG
+public :
+   int       findElement   (EltBase* elt);
+  ~Group ()                   {}
    void      saveXml  (XmlWriter* xml);
    EnumElt   getTypeElt ()                 { return grp_typelt ; }
 
    static EnumGroup getKind (cpchar kind);
-   static EnumGroup getKind (const string& k) { return getKind (k.c_str());}
+   static EnumGroup getKind (const std::string& k) { return getKind (k.c_str());}
 
 private :
    int grp_id;
-   static int last_grp_id;
    EnumGroup   grp_kind;
    EnumElt     grp_typelt;
-   std::string grp_name;
    std::vector <EltBase*> grp_table;
+#endif
 };
 
 END_NAMESPACE_HEXA