Skip to content

app/integration/ConfigurationStorageFactory.hpp

More...

Classes

Name
class ConfigurationStorageFactory

Detailed Description

Date: 2024-02-22 Henrique A. Klein ([email protected])

Source code

#ifndef _CONFIGURATION_STORAGE_FACTORY_HPP_
#define _CONFIGURATION_STORAGE_FACTORY_HPP_

#include "application/impl/configuration_storage_impl.hpp"

class ConfigurationStorageFactory
{
public:
    static std::shared_ptr<sgns::application::ConfigurationStorage> create( const std::string &path )
    {

        auto result = sgns::application::ConfigurationStorageImpl::create( path );

        if ( result )
        {
            return result.value();
        }
        else
        {
            throw std::runtime_error( "Configuration storage not found on Genesis path" );
        }
    }
};

#endif

Updated on 2026-03-04 at 13:10:44 -0800