QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::EntityManager Struct Reference
[Entity platform]

What manages all entities. More...

#include <Q/gamedev.h>

Inheritance diagram for Q::EntityManager:

Com::Unknown Q::EntityManager2 List of all members.

Public Types

typedef Com::Ptr< EntityManagerPTR

Public Member Functions

virtual unsigned int scopeAmount () const=0
virtual Utils::Result setScopeAmount (unsigned int)=0
virtual Utils::Result addFactory (EntityFactory *)=0
virtual Utils::Result removeFactory (EntityFactory *)=0
virtual unsigned int activeCount () const=0
virtual Utils::Result getActives (EntityIterator **) const=0
EntityIterator::PTR actives () const
virtual Utils::Result getEntities (EntityIterator **) const=0
EntityIterator::PTR entities () const
virtual Utils::Result find (const char *, EntityInstance **) const=0
virtual Utils::Result find (const Utils::UID &, EntityInstance **) const=0
virtual Utils::Result find (const Group &, EntityIterator **) const=0
virtual Utils::Result find (Entity *, EntityInstance **) const=0
virtual Utils::Result createEntityInstance (const char *name, const Group &, const Concept &type, const Database &, EntityInstance **)=0
virtual Utils::Result purge ()=0

Static Public Member Functions

PTR theManager ()

Static Public Attributes

Com::UUID IID
Com::UUID CLSID

Detailed Description

What manages all entities.

The main job of the EntityManager is to control the activation and deactivation of entities. It does this by watching for objects to come in to scope and later on, to go out of scope. The EntityManager::scopeAmount controls the maximum number of entities that may be activated per frame. For the entity manager to be able to function at all it must be given at least one entity factory. Those factories are in charge of managing the construction and the destruction of entities.


Member Typedef Documentation

typedef Com::Ptr<EntityManager> Q::EntityManager::PTR
 

A COM pointer to an object of this class

Reimplemented in Q::EntityManager2.


Member Function Documentation

virtual unsigned int Q::EntityManager::activeCount  )  const [pure virtual]
 

Returns the number of active entities

EntityIterator::PTR Q::EntityManager::actives  )  const [inline]
 

See also:
getActives

virtual Utils::Result Q::EntityManager::addFactory EntityFactory  )  [pure virtual]
 

Add a factory. Factories are called in the order in which they have been added when the manager requests the activation of an entity.

virtual Utils::Result Q::EntityManager::createEntityInstance const char *  name,
const Group ,
const Concept type,
const Database ,
EntityInstance ** 
[pure virtual]
 

Create an EntityInstance with the specified name, the specified group and the specified type.

Deprecated:
This method is deprecated. Please use EntityInstance2::createEntityInstance instead

EntityIterator::PTR Q::EntityManager::entities  )  const [inline]
 

See also:
getEntities

virtual Utils::Result Q::EntityManager::find Entity ,
EntityInstance ** 
const [pure virtual]
 

Find the EntityInstance associated with an entity.

Note:
The reference count of the EntityInstance will be increased by one after - the caller should release this reference using Com::Unknown::release.

virtual Utils::Result Q::EntityManager::find const Group ,
EntityIterator ** 
const [pure virtual]
 

Find the EntityInstance with the specified group.

Note:
The reference count of the EntityIterator will be one after creation. The caller should release this reference using Com::Unknown::release.

: for moving entities (i.e. EntityInstance2 objects whose move mode is either StartPosition, the look up will be performed for both the reference group and the group.

See also:
EntityManager::findActives

virtual Utils::Result Q::EntityManager::find const Utils::UID ,
EntityInstance ** 
const [pure virtual]
 

Find the EntityInstance with the specified UID.

Note:
The reference count of the EntityInstance will be one after creation. The caller should release this reference using Com::Unknown::release.

virtual Utils::Result Q::EntityManager::find const char *  ,
EntityInstance ** 
const [pure virtual]
 

Find the EntityInstance with the specified name.

Note:
The reference count of the EntityInstance will be one after creation. The caller should release this reference using Com::Unknown::release.

virtual Utils::Result Q::EntityManager::getActives EntityIterator **   )  const [pure virtual]
 

Returns the active entities.

Note:
The reference count of the EntityIterator will be one after creation. The caller should release this reference using Com::Unknown::release.

virtual Utils::Result Q::EntityManager::getEntities EntityIterator **   )  const [pure virtual]
 

Return all the EntityInstance objects.

Note:
The reference count of the EntityIterator will be one after creation. The caller should release this reference using Com::Unknown::release.

virtual Utils::Result Q::EntityManager::purge  )  [pure virtual]
 

Deactivate all active entities

virtual Utils::Result Q::EntityManager::removeFactory EntityFactory  )  [pure virtual]
 

Remove a factory

virtual unsigned int Q::EntityManager::scopeAmount  )  const [pure virtual]
 

The maximum number of entities created per frame

virtual Utils::Result Q::EntityManager::setScopeAmount unsigned  int  )  [pure virtual]
 

Set the maximum number of entities created per frame

EntityManager::PTR Q::EntityManager::theManager  )  [inline, static]
 

The singleton EntityManager.

Reimplemented in Q::EntityManager2.


Member Data Documentation

Com::UUID Q::EntityManager::CLSID [static]
 

COM CLSID 19320585-d662-43ff-a6d5-304f4311e6b3

Reimplemented in Q::EntityManager2.

Com::UUID Q::EntityManager::IID [static]
 

COM IID 8da08e2b-c989-40d6-a5ec-aa7eeb1e2114

Reimplemented from Com::Unknown.

Reimplemented in Q::EntityManager2.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004