Game Develop C++ Platform: ObjInstancesHolder Class Reference

| Game Develop C++ Platform Platform for developing native games based on OpenGL and SFML with Game Develop

- Main Page
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Public Member Functions | List of all members
ObjInstancesHolder Class Reference
Game engine

Hold lists of objects classified by the name of the objects. More...

`#include <ObjInstancesHolder.h>`

## Public Member Functions

void | AddObject (const RuntimeObjSPtr &object)
const RuntimeObjList & | GetObjects (const std::string &name)
std::vector< RuntimeObject * > | GetObjectsRawPointers (const std::string &name)
RuntimeObjList | GetAllObjects ()
void | RemoveObject (const RuntimeObjSPtr &object)
void | RemoveObjects (const std::string &name)
void | ObjectNameHasChanged (RuntimeObject *object)
ObjInstancesHolder | CopyAndCloneAllObjects () const
void | Clear ()

## Detailed Description

Hold lists of objects classified by the name of the objects.

See Also
  RuntimeScene

## Member Function Documentation

void ObjInstancesHolder::AddObject | ( | const RuntimeObjSPtr & | object) |  |

Add a new object to the lists

void ObjInstancesHolder::Clear | ( | ) |  |

inline

Clear the container.

ObjInstancesHolder ObjInstancesHolder::CopyAndCloneAllObjects | ( | ) |  | const

Return an new ObjInstancesHolder containing the same objects but copied.

Here is the call graph for this function:

RuntimeObjList ObjInstancesHolder::GetAllObjects | ( | ) |  |

inline

Get a list of all objects

const RuntimeObjList& ObjInstancesHolder::GetObjects | ( | const std::string & | name) |  |

inline

Get all objects with a specific name

std::vector< RuntimeObject * > ObjInstancesHolder::GetObjectsRawPointers | ( | const std::string & | name) |  |

Get a "raw pointers" list to objects with a specific name

void ObjInstancesHolder::ObjectNameHasChanged | ( | RuntimeObject * | object) |  |

Call this when changing name/identifier of an object.

Here is the call graph for this function:

void ObjInstancesHolder::RemoveObject | ( | const RuntimeObjSPtr & | object) |  |

inline

Remove an object

Attention
  In an event, do not directly remove an object using this function, but make its name empty instead. Example :
  myObject->SetName(""); //The scene will take care of deleting the object
  scene.objectsInstances.ObjectNameHasChanged(myObject);

void ObjInstancesHolder::RemoveObjects | ( | const std::string & | name) |  |

inline

Remove an entire list of object of the given identifier

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

- ObjInstancesHolder.h
- ObjInstancesHolder.cpp