Salome HOME
Unwarningization under Win.
[modules/med.git] / src / MEDCoupling / MEDCouplingRefCountObject.hxx
index 7d8c1904b20d7c3c4f9dac5366ab4f4d35008232..41c340d59abaf748146c60b00add219032b93ac1 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "MEDCoupling.hxx"
 
+#include <vector>
+#include <string>
 #include <cstddef>
 
 namespace ParaMEDMEM
@@ -56,21 +58,42 @@ namespace ParaMEDMEM
   MEDCOUPLING_EXPORT int MEDCouplingVersion();
   MEDCOUPLING_EXPORT void MEDCouplingVersionMajMinRel(int& maj, int& minor, int& releas);
   MEDCOUPLING_EXPORT int MEDCouplingSizeOfVoidStar();
+  MEDCOUPLING_EXPORT bool MEDCouplingByteOrder();
+  MEDCOUPLING_EXPORT const char *MEDCouplingByteOrderStr();
 
-  class MEDCOUPLING_EXPORT RefCountObject
+  class BigMemoryObject
+  {
+  public:
+    MEDCOUPLING_EXPORT std::size_t getHeapMemorySize() const;
+    MEDCOUPLING_EXPORT std::string getHeapMemorySizeStr() const;
+    MEDCOUPLING_EXPORT virtual std::size_t getHeapMemorySizeWithoutChildren() const = 0;
+    MEDCOUPLING_EXPORT virtual std::vector<const BigMemoryObject *> getDirectChildren() const = 0;
+    MEDCOUPLING_EXPORT virtual ~BigMemoryObject();
+  };
+  
+  class RefCountObjectOnly
   {
   protected:
-    RefCountObject();
-    RefCountObject(const RefCountObject& other);
+    MEDCOUPLING_EXPORT RefCountObjectOnly();
+    MEDCOUPLING_EXPORT RefCountObjectOnly(const RefCountObjectOnly& other);
   public:
-    bool decrRef() const;
-    void incrRef() const;
-    virtual std::size_t getHeapMemorySize() const = 0;
+    MEDCOUPLING_EXPORT bool decrRef() const;
+    MEDCOUPLING_EXPORT void incrRef() const;
+    MEDCOUPLING_EXPORT int getRCValue() const;
+    MEDCOUPLING_EXPORT RefCountObjectOnly& operator=(const RefCountObjectOnly& other);
   protected:
-    virtual ~RefCountObject();
+    virtual ~RefCountObjectOnly();
   private:
     mutable int _cnt;
   };
+
+  class RefCountObject : public RefCountObjectOnly, public BigMemoryObject
+  {
+  protected:
+    MEDCOUPLING_EXPORT RefCountObject();
+    MEDCOUPLING_EXPORT RefCountObject(const RefCountObject& other);
+    MEDCOUPLING_EXPORT virtual ~RefCountObject();
+  };
 }
 
 #endif