JayBeams  0.1
Another project to have fun coding.
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
jb::config_files_locations_base Class Reference

Define the configuration file search algorithm for JayBeams. More...

#include <config_files_location.hpp>

Inheritance diagram for jb::config_files_locations_base:
jb::config_files_locations< getenv_functor, validator_functor >

Public Member Functions

std::vector< boost::filesystem::path > const & search_path () const
 

Protected Member Functions

 config_files_locations_base (boost::filesystem::path const &argv0, std::function< char const *(char const *)> getenv, char const *program_root_variable)
 Constructor. More...
 
 config_files_locations_base (boost::filesystem::path const &argv0, std::function< char const *(char const *)> getenv)
 Constructor. More...
 

Private Attributes

std::vector< boost::filesystem::path > search_path_
 

Detailed Description

Define the configuration file search algorithm for JayBeams.

Please

See also
config_files_location_base, this class just refactors the implementation to a non-template class.

Definition at line 34 of file config_files_location.hpp.

Constructor & Destructor Documentation

◆ config_files_locations_base() [1/2]

jb::config_files_locations_base::config_files_locations_base ( boost::filesystem::path const &  argv0,
std::function< char const *(char const *)>  getenv,
char const *  program_root_variable 
)
protected

Constructor.

Parameters
argv0the path for the current program (typically argv[0])
program_root_variablethe name of the *_ROOT environment variable used by this program, it can be null if the program does not provide any.
getenva function to fetch the values of environment variables. Just used for dependency injection.

Definition at line 8 of file config_files_location.cpp.

References jb::bindir(), search_path_, and jb::sysconfdir().

◆ config_files_locations_base() [2/2]

jb::config_files_locations_base::config_files_locations_base ( boost::filesystem::path const &  argv0,
std::function< char const *(char const *)>  getenv 
)
protected

Constructor.

Parameters
argv0the path for the current program (typically argv[0])
getenva function to fetch the values of environment variables. Just used for dependency injection.

Definition at line 50 of file config_files_location.cpp.

Member Function Documentation

◆ search_path()

std::vector<boost::filesystem::path> const& jb::config_files_locations_base::search_path ( ) const
inline

Definition at line 36 of file config_files_location.hpp.

Member Data Documentation

◆ search_path_

std::vector<boost::filesystem::path> jb::config_files_locations_base::search_path_
private

Definition at line 70 of file config_files_location.hpp.

Referenced by config_files_locations_base().


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