ResourceCollection Class Reference

The class keeping the resources. More...

List of all members.

Public Member Functions

 ResourceCollection ()
 Constructor.
 ~ResourceCollection ()
 Destructor.
int decrementReferenceCounter () throw ()
 Decrements the reference counter.
QMutex & getLock ()
 Returns the global resource lock for this instance.
int getReferenceCounter () throw ()
 Returns the current value of the reference counter.
ResourceHandlergetResource (QString name, bool create=false)
 Returns a pointer to the resource handler for the resource with the specified name.
QWaitCondition & getWaitCondition ()
 Returns the wait condition on the global resource lock.
bool hasResource (QString name) const
 Returns true if a resource with name specified has been declared.
int incrementReferenceCounter () throw ()
 Increments the reference counter.

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.

Destructor.

Definition at line 177 of file resource.cpp.


Member Function Documentation

int decrementReferenceCounter ( ) throw () [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().

QMutex& getLock ( ) [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 ResourceCollectionHolder::operator=(), and ResourceCollectionHolder::~ResourceCollectionHolder().

int getReferenceCounter ( ) throw () [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:
namethe name of the resource
createif 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.

QWaitCondition& getWaitCondition ( ) [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.

bool hasResource ( QString  name) const [inline]

Returns true if a resource with name specified has been declared.

Parameters:
namethe name of the resource
Returns:
true if the resource exists; false otherwise

Definition at line 555 of file resource.h.

int incrementReferenceCounter ( ) throw () [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: