The class keeping the resources. More...
Public Member Functions | |
ResourceCollection () | |
Constructor. More... | |
~ResourceCollection () | |
Destructor. More... | |
int | decrementReferenceCounter () throw () |
Decrements the reference counter. More... | |
QMutex & | getLock () |
Returns the global resource lock for this instance. More... | |
int | getReferenceCounter () throw () |
Returns the current value of the reference counter. More... | |
ResourceHandler * | getResource (QString name, bool create=false) |
Returns a pointer to the resource handler for the resource with the specified name. More... | |
QWaitCondition & | getWaitCondition () |
Returns the wait condition on the global resource lock. More... | |
bool | hasResource (QString name) const |
Returns true if a resource with name specified has been declared. More... | |
int | incrementReferenceCounter () throw () |
Increments the reference counter. More... | |
Detailed Description
The class keeping the resources.
This is used internally by ResourcesUser subclasses and shared among different instances. The lock is not acquired by any function, so you have to acquire it externally
Definition at line 473 of file resource.h.
Constructor & Destructor Documentation
Constructor.
Definition at line 170 of file resource.cpp.
~ResourceCollection | ( | ) |
Destructor.
Definition at line 177 of file resource.cpp.
Member Function Documentation
|
inline |
Decrements the reference counter.
- Returns
- the new value of the reference counter
Definition at line 521 of file resource.h.
Referenced by ResourceCollectionHolder::~ResourceCollectionHolder().
|
inline |
Returns the global resource lock for this instance.
- Returns
- the global resource lock for this instance
Definition at line 491 of file resource.h.
Referenced by ConcurrentResourcesUser::addUsableResource(), ConcurrentResourcesUser::addUsableResources(), ConcurrentResourcesUser::deleteResource(), ConcurrentResourcesUser::hasResource(), ResourceCollectionHolder::operator=(), ConcurrentResourcesUser::removeAllUsableResources(), ConcurrentResourcesUser::removeUsableResource(), ConcurrentResourcesUser::removeUsableResources(), ConcurrentResourcesUser::shareResourcesWith(), ConcurrentResourcesUser::usableResources(), ConcurrentResourcesUser::usedResourcesExist(), and ResourceCollectionHolder::~ResourceCollectionHolder().
|
inline |
Returns the current value of the reference counter.
- Returns
- the value of the reference counter
Definition at line 531 of file resource.h.
ResourceHandler * getResource | ( | QString | name, |
bool | create = false |
||
) |
Returns a pointer to the resource handler for the resource with the specified name.
- Parameters
-
name the name of the resource create if true an non-existing ResourceHandler object is created if no resource with the given name exists
- Returns
- the pointer to the resource handler or NULL if no resource with the given name exists and create is false
Definition at line 185 of file resource.cpp.
Referenced by ConcurrentResourcesUser::addUsableResource(), ConcurrentResourcesUser::addUsableResources(), SimpleResourcesUser::deleteResource(), ConcurrentResourcesUser::deleteResource(), ConcurrentResourcesUser::removeUsableResource(), ConcurrentResourcesUser::removeUsableResources(), ConcurrentResourcesUser::shareResourcesWith(), and ConcurrentResourcesUser::usableResources().
|
inline |
Returns the wait condition on the global resource lock.
- Returns
- the wait condition on the global resource lock
Definition at line 501 of file resource.h.
|
inline |
Returns true if a resource with name specified has been declared.
- Parameters
-
name the name of the resource
- Returns
- true if the resource exists; false otherwise
Definition at line 555 of file resource.h.
Referenced by ConcurrentResourcesUser::hasResource().
|
inline |
Increments the reference counter.
- Returns
- the new value of the reference counter
Definition at line 511 of file resource.h.
The documentation for this class was generated from the following files:
- configuration/include/resource.h
- configuration/src/resource.cpp