Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# deWorld Class Reference

`#include <deWorld_priv.hpp>`

Inheritance diagram for deWorld:

[legend]
Collaboration diagram for deWorld:

[legend]
List of all members.

## Public Member Functions
| deWorld ()
| deWorld (const char *filename)
| ~deWorld ()
IdeResourceBase * | MakeCopy ()
| create a copy of the object in memory
void * | GetRscInterface (long interface_id)
deWorldID | GetWorldID ()
| Get the ID number of this world.
deWorldID | GetWorldIDUsingLocalID (deWorldID LocalID, deBoolean ForceLoad)
deWorldID | GetLocalIDFromLoadedWorld (deWorldID WorldID)
IdeWorldObject * | GetWorldObject (deObjectID ObjectID)
| Get the interface to an object based on its ID.
deObjectID | AddWorldObject (IdeWorldObject *Object)
deBoolean | AddWorldObjectWithID (IdeWorldObject *Object)
deBoolean | RemoveWorldObject (deObjectID ObjectID)
deBoolean | SetWorldID (deWorldID ID)
const char * | GetNextObjectTypeName (void *&PrevEntry)
deObjectID | GetNextObjectOfType (const char *TypeName, void *&PrevEntry)
deBoolean | Serialize (IdeFile *File)
| Write the world to an open file.
deBoolean | DeSerialize (IdeFile *File)
| Read the world from an open file.
deBoolean | WriteHeader (IdeFile *File)
deBoolean | CheckHeader (IdeFile *File)
deBoolean | WriteObjectInfo (IdeFile *File, deObjectID ObjectID, char *TypeName)
deBoolean | WriteObjectDataLength (IdeFile *File, long ObjectStartPos)
deBoolean | ReadObjectInfo (IdeFile *File, deObjectID &ObjectID, char TypeNameBuffer[256], long &DataLength)
## Protected Member Functions
deBoolean | RecordObjectWithTypeName (deObjectID ObjectID, const char *TypeName)
deBoolean | LoadFromFile (IdeFile *file)
friend | __declspec (dllexport) deBoolean IdeWorld_Initialize()
friend | __declspec (dllexport) long IdeWorld_GetRscInterfaceID()
## Private Attributes
deWorldID | m_WorldID
deObjectID | m_LatestItemID
deBoolean | m_LockDown
IdeIDServer * | m_ObjectIDServer
deTHashString< deTList< deObjectID > > | m_ObjectListHash
deTList< deString > | m_ObjectTypesUsed
deTArray< WorldRef_t > | m_ReferencedWorlds
## Friends
IdeResourceBase * | LoadWorldFile (const char *filename, IdeFile *worldfile, deBoolean isThreaded)

## Constructor & Destructor Documentation

deWorld::deWorld | ( |  | ) |

deWorld::deWorld | ( | const char * | filename | ) |

deWorld::~deWorld | ( |  | ) |

## Member Function Documentation

deWorld::__declspec | ( | dllexport |  | ) | `[protected]`

deWorld::__declspec | ( | dllexport |  | ) | `[protected]`

deObjectID deWorld::AddWorldObject | ( | IdeWorldObject * | Object | ) | `[virtual]`

| Implements IdeWorld.

deBoolean deWorld::AddWorldObjectWithID | ( | IdeWorldObject * | Object | ) | `[virtual]`

| Implements IdeWorld.

deBoolean deWorld::CheckHeader | ( | IdeFile * | File | ) |

deBoolean deWorld::DeSerialize | ( | IdeFile * | File | ) | `[virtual]`

| Read the world from an open file. Implements IdeWorld.

deWorldID deWorld::GetLocalIDFromLoadedWorld | ( | deWorldID | WorldID | ) | `[virtual]`

| translates the ID of a currently loaded deWorld into a "local" world ID that world objects can serialize safely. Implements IdeWorld.

deObjectID deWorld::GetNextObjectOfType | ( | const char * | TypeName,
|  | void *& | PrevEntry
| ) | `[virtual]`

  | Call repeatedly to retrieve the stored objects Returns: the ID of an object stored in this world with the type name specified Parameters:
  TypeName | a string indicating the typename of an object. Use return value of GetNextObjectTypeName.
  PrevEntry | a void pointer that is modified inside the function. Set to NULL for the first call.
Implements IdeWorld.

const char * deWorld::GetNextObjectTypeName | ( | void *& | PrevEntry | ) | `[virtual]`

  | Call repeatedly to retrieve the typenames of all the stored items Returns: pointer to character array containing name of a type Parameters:
  PrevEntry | a void pointer that is modified inside the function. Set to NULL for the first call.
Implements IdeWorld.

void * deWorld::GetRscInterface | ( | long | interface_id | ) | `[virtual]`

  | Used to retrieve a pointer to an interface registered through IdeResourceManager. Returns: NULL or a valid pointer to an interface supported by this object Parameters:
  interface_id | A value previously retrieved through IdeResourceManager::GetUniqueInterfaceID
Reimplemented from deResourceBase.

deWorldID deWorld::GetWorldID | ( |  | ) | `[virtual]`

| Get the ID number of this world. Implements IdeWorld.

deWorldID deWorld::GetWorldIDUsingLocalID | ( | deWorldID | LocalID,
|  | deBoolean | ForceLoad
| ) | `[virtual]`

| Used by descendants of IdeWorldObject so that they can store a "local" world ID which is serializable, using a translation layer. Reverses GetLocalIDFromLoadedWorld output Implements IdeWorld.

IdeWorldObject * deWorld::GetWorldObject | ( | deObjectID | ObjectID | ) | `[virtual]`

| Get the interface to an object based on its ID. Implements IdeWorld.

deBoolean deWorld::LoadFromFile | ( | IdeFile * | file | ) | `[protected]`

IdeResourceBase * deWorld::MakeCopy | ( |  | ) | `[virtual]`

| create a copy of the object in memory Implements deResourceBase.

deBoolean deWorld::ReadObjectInfo | ( | IdeFile * | File,
|  | deObjectID & | ObjectID,
|  | char | TypeNameBuffer[256],
|  | long & | DataLength
| ) |

deBoolean deWorld::RecordObjectWithTypeName | ( | deObjectID | ObjectID,
|  | const char * | TypeName
| ) | `[protected]`

deBoolean deWorld::RemoveWorldObject | ( | deObjectID | ObjectID | ) | `[virtual]`

| Implements IdeWorld.

deBoolean deWorld::Serialize | ( | IdeFile * | File | ) | `[virtual]`

| Write the world to an open file. Implements IdeWorld.

deBoolean deWorld::SetWorldID | ( | deWorldID | ID | ) |

deBoolean deWorld::WriteHeader | ( | IdeFile * | File | ) |

deBoolean deWorld::WriteObjectDataLength | ( | IdeFile * | File,
|  | long | ObjectStartPos
| ) |

deBoolean deWorld::WriteObjectInfo | ( | IdeFile * | File,
|  | deObjectID | ObjectID,
|  | char * | TypeName
| ) |

## Friends And Related Function Documentation

IdeResourceBase* LoadWorldFile | ( | const char * | filename,
|  | IdeFile * | worldfile,
|  | deBoolean | isThreaded
| ) | `[friend]`

## Member Data Documentation

deObjectID deWorld::m_LatestItemID`[private]`

deBoolean deWorld::m_LockDown`[private]`

IdeIDServer* deWorld::m_ObjectIDServer`[private]`

deTHashString< deTList<deObjectID> > deWorld::m_ObjectListHash`[private]`

deTList<deString> deWorld::m_ObjectTypesUsed`[private]`

deTArray<WorldRef_t> deWorld::m_ReferencedWorlds`[private]`

deWorldID deWorld::m_WorldID`[private]`

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

- deWorld_priv.hpp
- deWorld.cpp