networkservice
Public Member Functions | List of all members
service::plugins::config::IConfig Interface Referenceabstract

Load the configuration used by the service to set up the network. More...

#include "service/plugins/IConfig.h"

Inheritance diagram for service::plugins::config::IConfig:
Inheritance graph
[legend]

Public Member Functions

 IConfig ()=default
 
virtual ~IConfig ()=default
 
 IConfig (const IConfig &)=delete
 
IConfigoperator= (const IConfig &)=delete
 
 IConfig (IConfig &&)=delete
 
IConfigoperator= (IConfig &&)=delete
 
virtual std::unique_ptr< ConfigDataload (const std::string &configFile) const =0
 Load the the provided configuration file into memory. More...
 

Detailed Description

Load the configuration used by the service to set up the network.

This class is the high level interface that must be implemented by config plugin. The core service depends on it and not on its implementation(s) to respect the Dependency Inversion Principle. It is possible to retrieve the network configuration in various means that just need to be implemented if required:

Note
Copy contructor, copy-assignment operator, move constructor and move-assignment operator are defined to be compliant with the "Rule of five"
See also
https://en.cppreference.com/w/cpp/language/rule_of_three
Author
Boubacar DIENE bouba.nosp@m.car..nosp@m.diene.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Date
April 2020

Constructor & Destructor Documentation

◆ IConfig() [1/3]

service::plugins::config::IConfig::IConfig ( )
default

Class constructor

◆ ~IConfig()

virtual service::plugins::config::IConfig::~IConfig ( )
virtualdefault

Class destructor made virtual because it is used as base class by derived classes in config plugin

◆ IConfig() [2/3]

service::plugins::config::IConfig::IConfig ( const IConfig )
delete

Class copy constructor

◆ IConfig() [3/3]

service::plugins::config::IConfig::IConfig ( IConfig &&  )
delete

Class move constructor

Member Function Documentation

◆ load()

virtual std::unique_ptr<ConfigData> service::plugins::config::IConfig::load ( const std::string &  configFile) const
pure virtual

Load the the provided configuration file into memory.

Parameters
configFileConfiguration file to load
Returns
A data structure containing all the informations retrieved from the configuration file
See also
ConfigData

Implemented in service::plugins::config::Config.

◆ operator=() [1/2]

IConfig& service::plugins::config::IConfig::operator= ( const IConfig )
delete

Class copy-assignment operator

◆ operator=() [2/2]

IConfig& service::plugins::config::IConfig::operator= ( IConfig &&  )
delete

Class move-assignment operator


The documentation for this interface was generated from the following file: