Kaim::DatabaseBinding Class Reference

Kaim::DatabaseBinding Class Reference

#include <databasebinding.h>

Class Description

DatabaseBinding is a collection of the databases to be used for world elements spatialization.

Inherits Kaim::RefCountBaseNTS< C, Stat >.

Public Member Functions

 DatabaseBinding ()
 
KyResult AddDataBase (Database *database)
 
WorldGetWorld ()
 
KyUInt32 GetBoundDatabaseCount () const
 
DatabaseGetBoundDatabase (KyUInt32 boundDatabaseIndex) const
 
KyUInt32 GetBoundDatabaseIdx (KyUInt32 databaseIdxInWorld) const
 
void Clear ()
 

Member Function Documentation

KyResult Kaim::DatabaseBinding::AddDataBase ( Database database)

Adds a Database to this DatabaseBinding instance.

If this is the first Database, it initialize the internals to fit the databases count in the World and add the Database. If internal bound databases array is not empty, it checks the provided database is in the same World than the one(s) already there. If not, the database is simply ignored.

Precondition
database must be a valid pointer.
Return values
KY_SUCCESSThe provided Database has been successfully inserted in this DatabaseBinding.
KY_ERRORThe provided Database is either associated to no World or to another World than the databases already listed in this DatabaseBinding.
Database* Kaim::DatabaseBinding::GetBoundDatabase ( KyUInt32  boundDatabaseIndex) const
inline
Parameters
boundDatabaseIndexThe index of the Database to retrieve in bound databases array.
Precondition
boundDatabaseIndex must be valid (less than GetBoundDatabaseCount()), it is not checked there.
KyUInt32 Kaim::DatabaseBinding::GetBoundDatabaseIdx ( KyUInt32  databaseIdxInWorld) const
inline
Parameters
databaseIdxInWorldThe index of the Database in World databases array.
Returns
The index of the Database in bound databases array if the database is there; KyUInt32MAXVAL otherwise.

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