object manager singleton now
This commit is contained in:
@ -26,9 +26,9 @@ ObjectManagerIF *objectManager = nullptr;
|
||||
void initmission::initMission() {
|
||||
sif::info << "Building global objects.." << std::endl;
|
||||
/* Instantiate global object manager and also create all objects */
|
||||
objectManager = new ObjectManager(ObjectFactory::produce);
|
||||
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
||||
sif::info << "Initializing all objects.." << std::endl;
|
||||
objectManager->initialize();
|
||||
ObjectManager::instance()->initialize();
|
||||
|
||||
/* This function creates and starts all tasks */
|
||||
initTasks();
|
||||
|
@ -51,7 +51,7 @@ void Factory::setStaticFrameworkObjectIds() {
|
||||
|
||||
|
||||
|
||||
void ObjectFactory::produce(){
|
||||
void ObjectFactory::produce(void* args){
|
||||
Factory::setStaticFrameworkObjectIds();
|
||||
ObjectFactory::produceGenericObjects();
|
||||
|
||||
|
@ -1,17 +1,10 @@
|
||||
/*
|
||||
* ObjectFactory.h
|
||||
*
|
||||
* Created on: Sep 22, 2020
|
||||
* Author: steffen
|
||||
*/
|
||||
|
||||
#ifndef BSP_LINUX_OBJECTFACTORY_H_
|
||||
#define BSP_LINUX_OBJECTFACTORY_H_
|
||||
|
||||
|
||||
namespace ObjectFactory {
|
||||
void setStatics();
|
||||
void produce();
|
||||
void produce(void* args);
|
||||
};
|
||||
|
||||
#endif /* BSP_LINUX_OBJECTFACTORY_H_ */
|
||||
|
Reference in New Issue
Block a user