-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 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
// 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 "MEDCoupling.hxx"
+#include <set>
#include <vector>
#include <string>
#include <cstddef>
public:
MEDCOUPLING_EXPORT std::size_t getHeapMemorySize() const;
MEDCOUPLING_EXPORT std::string getHeapMemorySizeStr() const;
+ MEDCOUPLING_EXPORT static std::size_t GetHeapMemorySizeOfObjs(const std::vector<const BigMemoryObject *>& objs);
MEDCOUPLING_EXPORT virtual std::size_t getHeapMemorySizeWithoutChildren() const = 0;
MEDCOUPLING_EXPORT virtual std::vector<const BigMemoryObject *> getDirectChildren() const = 0;
MEDCOUPLING_EXPORT virtual ~BigMemoryObject();
+ private:
+ static std::size_t GetHeapMemoryOfSet(std::set<const BigMemoryObject *>& s1, std::set<const BigMemoryObject *>& s2);
};
class RefCountObjectOnly
{
protected:
- RefCountObjectOnly();
- RefCountObjectOnly(const RefCountObjectOnly& other);
+ MEDCOUPLING_EXPORT RefCountObjectOnly();
+ MEDCOUPLING_EXPORT RefCountObjectOnly(const RefCountObjectOnly& other);
public:
MEDCOUPLING_EXPORT bool decrRef() const;
MEDCOUPLING_EXPORT void incrRef() const;
class RefCountObject : public RefCountObjectOnly, public BigMemoryObject
{
protected:
- RefCountObject();
- RefCountObject(const RefCountObject& other);
- virtual ~RefCountObject();
+ MEDCOUPLING_EXPORT RefCountObject();
+ MEDCOUPLING_EXPORT RefCountObject(const RefCountObject& other);
+ MEDCOUPLING_EXPORT virtual ~RefCountObject();
};
}