diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-07 02:48:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-08 16:46:28 +0300 |
commit | 27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f (patch) | |
tree | c2c38e1b4f308ca885dc3c3581560cfbc6833a8e /src/resources/resource.h | |
parent | d4e28aa97cbce34a0053d3c02cf070ef9065439f (diff) | |
download | manaplus-27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f.tar.gz manaplus-27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f.tar.bz2 manaplus-27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f.tar.xz manaplus-27a2dd4fce2d529cd1d96aa5ddce1e74b4f54a2f.zip |
Move resourcemanager from class to namespace.
Diffstat (limited to 'src/resources/resource.h')
-rw-r--r-- | src/resources/resource.h | 20 |
1 files changed, 11 insertions, 9 deletions
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 @@ -57,6 +55,11 @@ class Resource notfinal : public MemoryCounter A_DELETE_COPY(Resource) /** + * Destructor. + */ + virtual ~Resource(); + + /** * Increments the internal reference count. */ virtual void incRef(); @@ -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; |