object manager singleton now

This commit is contained in:
2021-06-08 16:45:25 +02:00
committed by Robin Mueller
parent 4caf6e102c
commit b7e26be45e
19 changed files with 46 additions and 49 deletions

View File

@ -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();

View File

@ -51,7 +51,7 @@ void Factory::setStaticFrameworkObjectIds() {
void ObjectFactory::produce(){
void ObjectFactory::produce(void* args){
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();

View File

@ -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_ */