Salome HOME
Modification of the getHeapMemorySize computation.
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingRefCountObject.hxx
index 943c40a0612216f8ffa5f587eac70485d2943d9f..3d987d706e4825f11b83c4dbd412efc3df22a628 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2013  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
@@ -23,6 +23,8 @@
 
 #include "MEDCoupling.hxx"
 
+#include <vector>
+#include <string>
 #include <cstddef>
 
 namespace ParaMEDMEM
@@ -55,16 +57,24 @@ namespace ParaMEDMEM
   MEDCOUPLING_EXPORT const char *MEDCouplingVersionStr();
   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 RefCountObject
   {
   protected:
     RefCountObject();
     RefCountObject(const RefCountObject& 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 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<RefCountObject *> getDirectChildren() const = 0;
+    MEDCOUPLING_EXPORT int getRCValue() const;
+    MEDCOUPLING_EXPORT RefCountObject& operator=(const RefCountObject& other);
   protected:
     virtual ~RefCountObject();
   private: