Salome HOME
Merge branch 'rnv/win_swig_generation' of salome:tools/medcoupling into rnv/win_swig_...
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingRefCountObject.hxx
index bba58608c6ad5299f748d56a58082a2b1ea7b917..5130f1a2f00f8eb3b5c205d5eb06a186d2ba6b60 100644 (file)
@@ -24,6 +24,7 @@
 #include "MEDCoupling.hxx"
 
 #include <set>
+#include <map>
 #include <vector>
 #include <string>
 #include <cstddef>
@@ -103,6 +104,26 @@ namespace MEDCoupling
     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& value);
+    MEDCOUPLING_EXPORT void setKeyValueForce(const std::string& key, const std::string& value);
+    MEDCOUPLING_EXPORT std::string printSelf() const;
+  private:
+    GlobalDict() { }
+  private:
+    static GlobalDict *UNIQUE_INSTANCE;
+  private:
+    std::map<std::string, std::string> _my_map;
+  };
 }
 
 #endif