From 27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 7 Apr 2017 02:48:12 +0300 Subject: Move resourcemanager from class to namespace. --- src/resources/resource.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/resources/resource.h') diff --git a/src/resources/resource.h b/src/resources/resource.h index e9f7e0531..4b2f57229 100644 --- a/src/resources/resource.h +++ b/src/resources/resource.h @@ -32,17 +32,15 @@ */ class Resource notfinal : public MemoryCounter { - friend class ResourceManager; - public: /** * Constructor */ Resource() : MemoryCounter(), + mTimeStamp(0), mIdPath(), mSource(), - mTimeStamp(0), mRefCount(0), mProtected(false), #ifdef DEBUG_DUMP_LEAKS @@ -56,6 +54,11 @@ class Resource notfinal : public MemoryCounter A_DELETE_COPY(Resource) + /** + * Destructor. + */ + virtual ~Resource(); + /** * Increments the internal reference count. */ @@ -76,6 +79,9 @@ class Resource notfinal : public MemoryCounter const std::string &getIdPath() const noexcept2 A_WARN_UNUSED { return mIdPath; } + void setIdPath(const std::string &path) + { mIdPath = path; } + /** * Return refCount for this resource. */ @@ -110,19 +116,15 @@ class Resource notfinal : public MemoryCounter { mDumped = n; } #endif // DEBUG_DUMP_LEAKS + time_t mTimeStamp; /**< Time at which the resource was orphaned. */ + #ifndef UNITTESTS protected: #endif // UNITTESTS - /** - * Destructor. - */ - virtual ~Resource(); - std::string mIdPath; /**< Path identifying this resource. */ std::string mSource; private: - time_t mTimeStamp; /**< Time at which the resource was orphaned. */ unsigned int mRefCount; /**< Reference count. */ bool mProtected; bool mNotCount; -- cgit v1.2.3-70-g09d2