Simulant  21.12-194
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
smlt::_object_manager_impl::ObjectManagerBase< IDType, ObjectType, ObjectTypePtrType, SmartPointerConverter > Class Template Referenceabstract

Public Types

typedef ObjectManagerBase< IDType, ObjectType, ObjectTypePtrType, SmartPointerConverter > this_type
typedef ObjectTypePtrType ObjectTypePtr
typedef ObjectTypePtrType::element_type object_type

Public Member Functions

virtual void update ()=0
uint32_t count () const
ObjectTypePtrType clone (IDType id, this_type *target_manager=nullptr)
template<typename... Args>
ObjectTypePtrType make (Args &&... args)
template<typename T , typename... Args>
ObjectTypePtrType make_as (Args &&... args)
void destroy (IDType id)
void destroy_all ()
ObjectTypePtr get (IDType id) const
bool contains (IDType id) const
void each (std::function< void(uint32_t, ObjectTypePtr)> callback)
void each (std::function< void(uint32_t, const ObjectTypePtr)> callback) const
ObjectTypePtr find_object (const std::string &name) const

Protected Types

typedef std::shared_ptr< ObjectType > ObjectTypeInternalPtrType

Protected Member Functions

uint32_t next_id ()
virtual void on_make (IDType id)
virtual void on_get (IDType id)
virtual void on_destroy (IDType id)

Protected Attributes

std::unordered_map< IDType, ObjectTypeInternalPtrType > objects_
sig::signal< void(ObjectType &, IDType)> signal_post_create_
sig::signal< void(ObjectType &, IDType)> signal_pre_destroy_

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