You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#ifndef __KERNEL_MODULE_FACTORY_HEADER__
#define __KERNEL_MODULE_FACTORY_HEADER__
#include "../components/base/basicThread.h"
#include "../components/base/basicMutex.h"
#include "kernelModule.h"
#include "dataBinder.h"
class kernelModuleFactory: public basicThread{ private: basicLogCollection * m_pLog; dataBinder * m_pDBC; uint32_t m_nInstanceID; vectorKernelModules m_vKernelModules; basicMutex m_mModulesProtector; bool m_bInitialValidationDone; bool m_bInitialLoadModulesDone; void deleteModule( kernelModule * ); public: static kernelModuleFactory * getInstance( uint32_t InstanceID = 0 ); virtual ~kernelModuleFactory(); kernelModule * createModule( int id ); void deleteModule( int id ); kernelModule * getModule( uint32_t id ); kernelModule * getModule( KERNEL_MODULE_TYPE t, uint32_t id = 0 ); uint32_t getModulesCount( KERNEL_MODULE_TYPE t ); uint32_t fetchModules( KERNEL_MODULE_TYPE, kernelModule**&RA ); bool loadModules( void ); bool validate( void ); void shutdownServices( bool force = false ); bool isValidationDone( void ){ return m_bInitialValidationDone; }; protected: explicit kernelModuleFactory( uint32_t InstanceID ); virtual void m_fThreadProc( void ); private: static kernelModuleFactory * _instance;};
#endif
|