void Uninitialize() { ObjectFactory *instance = ObjectFactory::getInstance(); if (instance == NULL) { VMF_EXCEPTION(InternalErrorException, "Can't get Object factory instance"); } std::shared_ptr<IDataSourceFactory> emptyDataSourceFactoryPtr; instance->setDataSourceFactory(emptyDataSourceFactoryPtr); }
void Initialize(std::shared_ptr<IDataSourceFactory> &dataSourceFactory) { if (!dataSourceFactory) { VMF_EXCEPTION(IncorrectParamException, "Unable to initialize by empty DataSourceFactory instance"); } ObjectFactory *instance = ObjectFactory::getInstance(); if (instance == NULL) { VMF_EXCEPTION(InternalErrorException, "Can't get Object factory instance"); } instance->setDataSourceFactory(dataSourceFactory); }