Salome HOME
scotch6.0.4 needs pthread... Quick and dirty solution to be improved
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingRefCountObject.hxx
index 897cdc6f749c3eb681cf174580825b2669c9d6ba..b0fb54ce1c639821b524782b87efafed864760f6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  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
 #include "MEDCoupling.hxx"
 
 #include <set>
+#include <map>
 #include <vector>
 #include <string>
 #include <cstddef>
 
-namespace ParaMEDMEM
+namespace MEDCoupling
 {
   typedef enum
   {
@@ -63,7 +64,8 @@ namespace ParaMEDMEM
   MEDCOUPLING_EXPORT int MEDCouplingSizeOfVoidStar();
   MEDCOUPLING_EXPORT bool MEDCouplingByteOrder();
   MEDCOUPLING_EXPORT const char *MEDCouplingByteOrderStr();
-
+  MEDCOUPLING_EXPORT bool IsCXX11Compiled();
+  
   class BigMemoryObject
   {
   public:
@@ -103,6 +105,26 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT RefCountObject(const RefCountObject& other);
     MEDCOUPLING_EXPORT virtual ~RefCountObject();
   };
+
+  class GlobalDict
+  {
+  public:
+    MEDCOUPLING_EXPORT static GlobalDict *GetInstance();
+    MEDCOUPLING_EXPORT bool hasKey(const std::string& key) const;
+    MEDCOUPLING_EXPORT std::string value(const std::string& key) const;
+    MEDCOUPLING_EXPORT std::vector<std::string> keys() const;
+    MEDCOUPLING_EXPORT void erase(const std::string& key);
+    MEDCOUPLING_EXPORT void clear();
+    MEDCOUPLING_EXPORT void setKeyValue(const std::string& key, const std::string& val);
+    MEDCOUPLING_EXPORT void setKeyValueForce(const std::string& key, const std::string& val);
+    MEDCOUPLING_EXPORT std::string printSelf() const;
+  private:
+    GlobalDict() { }
+  private:
+    static GlobalDict *UNIQUE_INSTANCE;
+  private:
+    std::map<std::string, std::string> _my_map;
+  };
 }
 
 #endif