deResourceList Class Reference

Resource list class. More...

#include <deResourceList.h>

List of all members.

Public Member Functions

Constructors and Destructors
 deResourceList ()
 Creates a new resource list.
 ~deResourceList ()
 Cleans up the resource list without freeing resources in the list.
Management
int GetResourceCount () const
 Retrieves the count of resources.
deResourceGetResourceAt (int index) const
 Retrieves the resource at the given index.
int IndexOfResource (deResource *resource) const
 Retrieves the index of the given resource or -1 if not found.
bool HasResource (deResource *resource) const
 Determines if the given resource is part of the list.
void AddResource (deResource *resource)
 Adds a resource to the list without adding a reference to it.
void RemoveResource (deResource *resource)
 Removes a resource from the list without freeing it.
void RemoveAllResources ()
 Removes all resources without freeing them.

Detailed Description

Resource list class.

The resource list class is the backend for resource management. This list contains the main reference to the resource object. The list does not call 'delete' on the resource object but removes the pointer to it. The resource object calls 'delete' on itself thus never call it yourself except one situation. If you have created a resource object and have not added it to the resource list yet you have to use call 'delete' on it yourself to avoid triggering RemoveResource on the resource manager.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

deResourceList::deResourceList (  )

Creates a new resource list.

deResourceList::~deResourceList (  )

Cleans up the resource list without freeing resources in the list.


Member Function Documentation

void deResourceList::AddResource ( deResource resource )

Adds a resource to the list without adding a reference to it.

deResource* deResourceList::GetResourceAt ( int  index ) const

Retrieves the resource at the given index.

int deResourceList::GetResourceCount (  ) const [inline]

Retrieves the count of resources.

bool deResourceList::HasResource ( deResource resource ) const

Determines if the given resource is part of the list.

int deResourceList::IndexOfResource ( deResource resource ) const

Retrieves the index of the given resource or -1 if not found.

void deResourceList::RemoveAllResources (  )

Removes all resources without freeing them.

void deResourceList::RemoveResource ( deResource resource )

Removes a resource from the list without freeing it.


The documentation for this class was generated from the following file: