summaryrefslogtreecommitdiff
path: root/src/resources/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/resource.h')
-rw-r--r--src/resources/resource.h20
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;