ONE - On-device Neural Engine
|
#include <ObjectManager.h>
Public Member Functions | |
ObjectManager (Module *m=nullptr) | |
template<typename T > | |
T * | create (void) |
void | destroy (Object *o) |
Destroy (= deallocate) an Object entity. | |
template<> | |
FeatureObject * | create (void) |
template<> | |
KernelObject * | create (void) |
Public Member Functions inherited from coco::PtrManager< Object > | |
uint32_t | size (void) const |
Return the number of managed objects. | |
Object * | at (uint32_t n) const |
Public Member Functions inherited from coco::EntityBuilder | |
virtual | ~EntityBuilder ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from coco::PtrManager< Object > | |
U * | take (std::unique_ptr< U > &&o) |
std::unique_ptr< Object > | release (Object *ptr) |
Protected Member Functions inherited from coco::EntityBuilder | |
Module * | module (void) const |
void | module (Module *m) |
void | modulize (Entity *entity) const |
Definition at line 33 of file ObjectManager.h.
|
inline |
T * coco::ObjectManager::create | ( | void | ) |
FeatureObject * coco::ObjectManager::create | ( | void | ) |
Definition at line 30 of file ObjectManager.cpp.
References coco::EntityBuilder::modulize(), and coco::PtrManager< Object >::take().
KernelObject * coco::ObjectManager::create | ( | void | ) |
Definition at line 37 of file ObjectManager.cpp.
References coco::EntityBuilder::modulize(), and coco::PtrManager< Object >::take().
void coco::ObjectManager::destroy | ( | Object * | o | ) |
Destroy (= deallocate) an Object entity.
NOTE An Object SHOULD HAVE NO DEF & USES to be destructed NOTE An Object WILL BE unlinked from its dependent bag (if has) on destruction
Definition at line 44 of file ObjectManager.cpp.
References coco::Object::def(), coco::PtrManager< Object >::release(), and coco::Object::uses().