advgetopt 2.0.47
Parse complex command line arguments and configuration files in C++.
Typedefs | Variables
advgetopt::anonymous_namespace{conf_file.cpp} Namespace Reference

Private conf_file data. More...

Typedefs

typedef std::map< std::string, conf_file::pointer_tconf_file_map_t
 A map of configuration files.
 

Variables

conf_file_map_t g_conf_files = conf_file_map_t()
 The configuration files.
 

Detailed Description

The conf_file has a few globals used to cache configuration files. Since it has to work in a multi-thread environment, we also have a mutex.

Typedef Documentation

◆ conf_file_map_t

typedef std::map<std::string, conf_file::pointer_t> advgetopt::anonymous_namespace{conf_file.cpp}::conf_file_map_t

This typedef defines a type used to hold all the configuration files that were loaded so far.

The map is indexed by a string representing the full path to the configuration file.

The value is a shared pointer to configuration file. Since we may share that data between multiple users, it made sense to force you to use a configuration file smart pointer. Note, though, that we never destroy the pointer until we quit (i.e. you cannot force a re-load of the configuration file. Changes that happen in memory are visible to all users, but changes to the actual configuration file are complete invisible to use.)

Definition at line 118 of file conf_file.cpp.

Variable Documentation

◆ g_conf_files

This global defines a list of configuration files indexed by filename (full path, but not the URL, just a path.)

Whenever a configuration file is being retrieved with the conf_file::get_conf_file() function, it is first searched in this map. If it exists in the map, that version gets used (if the URL of the two setups match one to one.) If there is no such file in the map, then a new one is created by loading the corresponding file.

Definition at line 133 of file conf_file.cpp.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.