Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Classes | Public Member Functions | List of all members
Settings Class Reference

This is the implementation file of Settings. More...

#include <settings.hh>

Collaboration diagram for Settings:
Collaboration graph

Classes

class  SettingsImpl
 

Public Member Functions

 Settings ()
 
 Settings (std::string)
 
 Settings (Settings &&)
 
void operator= (Settings &&)
 Move operators. More...
 
 ~Settings ()
 
Settingsload ()&
 
Settings && load ()&&
 
template<typename T >
get (std::string) const
 
std::string getip () const
 
template<typename T >
get (string str) const
 

Detailed Description

This is the implementation file of Settings.

Author
Vicente Adolfo Bolea Sanchez

Settings will read the configuration file eclipse.json and load all the necessary properties. The path of the eclipse.json will be:

  1. ~/.eclipse.json
  2. /etc/eclipse.json
  3. Constructor path
    See Also
    Settings::Settings(std::string)
  4. Hardcoded path, setted using autoconf

The way it was designed to be used was:

Settings setted = Settings().load();
string path1 = setted.get<string>("path1");
Attention
This class uses the P.I.M.P.L. (Pointer to implementation) idiom this reduces the complexity of the interface and compilation time.

Copyright © 2015 Vicente Adolfo Bolea Sanchez

This library is free software; you can redistribute it and/or modify It under the terms of the GNU Lesser General Public License as published By the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, But WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License Along with this library; if not, see http://www.gnu.org/licenses/.

Constructor & Destructor Documentation

Settings::Settings ( )
Settings::Settings ( std::string  )
Settings::Settings ( Settings &&  that)
Settings::~Settings ( )

Member Function Documentation

template<typename T >
T Settings::get ( std::string  ) const
template<typename T >
T Settings::get ( string  str) const
string Settings::getip ( ) const
Settings && Settings::load ( )
Settings&& Settings::load ( )
void Settings::operator= ( Settings &&  that)

Move operators.


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