Salome HOME
Updated copyright comment
[modules/hexablock.git] / src / HEXABLOCK / Hex.hxx
old mode 100755 (executable)
new mode 100644 (file)
index 2035a03..2421bfa
@@ -1,12 +1,12 @@
 
 // class : La clase principale de Hexa
 
-// 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
 
 #include "hexa_base.hxx"
 
+#if defined WIN32
+#pragma warning ( disable: 4251 )
+#endif
+
 BEGIN_NAMESPACE_HEXA
 
-class Hex
+HexaExport Hex*  hex_instance ();
+
+class HexaExport Hex
 {
 public:
+   static Hex* getInstance ();
+
    int       countDocument ();
    Document* getDocument (int nro);
    void      removeDocument (Document* doc);
 
-   Document* addDocument  (const char* name="default");
-   Document* loadDocument (const char* name);
+   Document* addDocument  (cpchar name="default");
+   Document* loadDocument (cpchar name);
+   Document* findDocument (cpchar name);
+   Document* findDocument (const std::string& name) 
+             { return findDocument (name.c_str()) ; }
+   void what ();
+   int    sizeofMessage  ();
+   cpchar getMessageLine (int nlig);
+
+#ifndef SWIG
+   int loadAllDocs (cpchar flow);
+   int saveAllDocs (cpchar filename);
+   void makeName   (cpchar radical, std::string& name);
 
+   void lockDump();
+   void restoreDump();
+     
+// private:
              //  Constructeur + destructeur
     Hex ();
    ~Hex ();
 
 private:
-   vector <Document*> liste_documents;
+   static Hex* first_instance;
+   std::vector <Document*> liste_documents;
+   Globale*    glob;
+#endif    // not SWIG
 };
 
+HexaExport void what ();
+
 END_NAMESPACE_HEXA
 #endif