Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
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);
}