networkservice
Public Member Functions | Private Attributes | List of all members
service::plugins::config::Config Class Reference

Load the provided configuration file. More...

#include "plugins/config/Config.h"

Inheritance diagram for service::plugins::config::Config:
Inheritance graph
[legend]
Collaboration diagram for service::plugins::config::Config:
Collaboration graph
[legend]

Public Member Functions

 Config (const utils::file::IReader &reader)
 
 ~Config () override
 
 Config (const Config &)=delete
 
Configoperator= (const Config &)=delete
 
 Config (Config &&)=delete
 
Configoperator= (Config &&)=delete
 
std::unique_ptr< ConfigDataload (const std::string &configFile) const override
 Load the configuration file into ConfigData. More...
 
- Public Member Functions inherited from service::plugins::config::IConfig
 IConfig ()=default
 
virtual ~IConfig ()=default
 
 IConfig (const IConfig &)=delete
 
IConfigoperator= (const IConfig &)=delete
 
 IConfig (IConfig &&)=delete
 
IConfigoperator= (IConfig &&)=delete
 

Private Attributes

std::unique_ptr< Internal > m_internal
 

Detailed Description

Load the provided configuration file.

This class is the "low level class" that implements IConfig.h

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

◆ Config() [1/3]

service::plugins::config::Config::Config ( const utils::file::IReader reader)
explicit

Class constructor

Parameters
readerReader object to allow reading from files

◆ ~Config()

service::plugins::config::Config::~Config ( )
override

Class destructor

Note
The override specifier aims at making the compiler warn if the base class's destructor is not virtual.

◆ Config() [2/3]

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

Class copy constructor

◆ Config() [3/3]

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

Class move constructor

Member Function Documentation

◆ load()

std::unique_ptr<ConfigData> service::plugins::config::Config::load ( const std::string &  configFile) const
overridevirtual

Load the configuration file into ConfigData.

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

Implements service::plugins::config::IConfig.

◆ operator=() [1/2]

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

Class copy-assignment operator

◆ operator=() [2/2]

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

Class move-assignment operator

Member Data Documentation

◆ m_internal

std::unique_ptr<Internal> service::plugins::config::Config::m_internal
private

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