advgetopt 2.0.47
Parse complex command line arguments and configuration files in C++.
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
advgetopt::conf_file Class Reference

#include <conf_file.h>

Inheritance diagram for advgetopt::conf_file:
Inheritance graph
[legend]
Collaboration diagram for advgetopt::conf_file:
Collaboration graph
[legend]

Classes

struct  callback_entry_t
 

Public Types

typedef int callback_id_t
 
typedef std::function< void(pointer_t conf_file, callback_action_t action, std::string const &parameter_name, std::string const &value)> callback_t
 
typedef std::map< std::string, parameter_valueparameters_t
 
typedef std::shared_ptr< conf_filepointer_t
 
typedef string_set_t sections_t
 

Public Member Functions

callback_id_t add_callback (callback_t const &c, std::string const &parameter_name=std::string())
 Add a callback to detect when changes happen.
 
void erase_all_parameters ()
 Clear the list of all existing parameters from this file.
 
bool erase_parameter (std::string name)
 Erase the named parameter from this configuration file.
 
bool exists () const
 Whether an input file was found.
 
int get_errno () const
 Get the error number opening/reading the configuration file.
 
std::string get_parameter (std::string name) const
 Get the named parameter.
 
parameters_t get_parameters () const
 Get a list of parameters.
 
sections_t get_sections () const
 Get a list of sections.
 
conf_file_setup constget_setup () const
 Get the configuration file setup.
 
variables::pointer_t get_variables () const
 Retrieve the currently attached variables.
 
bool has_parameter (std::string name) const
 Check whether a parameter is defined.
 
assignment_t is_assignment_operator (char const *&s, bool skip) const
 Check whether c is an assignment operator.
 
bool is_comment (char const *s) const
 Check whether the string starts with a comment introducer.
 
void remove_callback (callback_id_t id)
 Remove a callback.
 
bool save_configuration (std::string backup_extension=std::string(".bak"), bool replace_backup=false, bool prepend_warning=true, std::string output_filename=std::string())
 Save the configuration file.
 
int section_to_variables (std::string const &section_name, variables::pointer_t var)
 Look for a section to convert in a list of variables.
 
bool set_parameter (std::string section, std::string name, std::string const &value, assignment_t op=assignment_t::ASSIGNMENT_NONE, std::string const &comment=std::string())
 Set a parameter.
 
void set_variables (variables::pointer_t variables)
 Attach a variables object to the configuration file.
 
bool was_modified () const
 Check whether this configuration file was modified.
 

Static Public Member Functions

static pointer_t get_conf_file (conf_file_setup const &setup)
 Create and read a conf_file.
 
static void reset_conf_files ()
 Forget all the cached configuration files.
 

Private Types

typedef std::vector< callback_entry_tcallback_vector_t
 

Private Member Functions

 conf_file (conf_file_setup const &setup)
 Initialize and read a configuration file.
 
bool get_line (std::ifstream &stream, std::string &line)
 Get one line.
 
int getc (std::ifstream &stream)
 Read one characte from the input stream.
 
void read_configuration ()
 Read a configuration file.
 
void ungetc (int c)
 Restore one character.
 
void value_changed (callback_action_t action, std::string const &parameter_name, std::string const &value)
 Call whenever the value changed so we can handle callbacks.
 

Private Attributes

callback_vector_t f_callbacks = callback_vector_t()
 
int f_errno = 0
 
bool f_exists = false
 
int f_line = 0
 
bool f_modified = false
 
callback_id_t f_next_callback_id = 0
 
parameters_t f_parameters = parameters_t()
 
bool f_reading = false
 
sections_t f_sections = sections_t()
 
conf_file_setup const f_setup
 
int f_unget_char = '\0'
 
variables::pointer_t f_variables = variables::pointer_t()
 

Detailed Description

Definition at line 182 of file conf_file.h.

Member Typedef Documentation

◆ callback_id_t

Definition at line 194 of file conf_file.h.

◆ callback_t

Definition at line 193 of file conf_file.h.

◆ callback_vector_t

Definition at line 254 of file conf_file.h.

◆ parameters_t

Definition at line 188 of file conf_file.h.

◆ pointer_t

Definition at line 186 of file conf_file.h.

◆ sections_t

Definition at line 187 of file conf_file.h.

Constructor & Destructor Documentation

◆ conf_file()

advgetopt::conf_file::conf_file ( conf_file_setup const setup)
private

This constructor initializes this conf_file object and then reads the corresponding configuration file.

Note that you have to use the create_conf_file() function for you to be able to create a configuration file. It is done that way became a file can be read only once. Once loaded, it gets cached until your application quits.

Parameters
[in]setupThe configuration file setup.

Definition at line 1046 of file conf_file.cpp.

References read_configuration().

Member Function Documentation

◆ add_callback()

conf_file::callback_id_t advgetopt::conf_file::add_callback ( callback_t const c,
std::string const parameter_name = std::string() 
)

This function is used to attach a callback to this configuration file. This is useful if you'd like to know when a change happen to a parameter in this configuration file.

The callbacks get called when:

You can cancel your callback by calling the remove_callback() function with the identifier returned by this function.

To attach another object to your callback, you can either create a callback which is attached to your object and a function member or use std::bind() to attach the object to the function call.

If you specifcy a parameter_name, the callback is called only if the parameter has that specific name.

Parameters
[in]cThe new callback std::function.
[in]parameter_nameThe parameter name or an empty string.
Returns
The callback identifier (useful if you want to be able to remove it).

Definition at line 1100 of file conf_file.cpp.

References f_callbacks, f_next_callback_id, and advgetopt::get_global_mutex().

◆ erase_all_parameters()

void advgetopt::conf_file::erase_all_parameters ( )

This function goes through the list of parameters it contains and erase each one of them in turn.

The function calls the erase_parameter() function with each one of the parameter still in the list. It is done that way to make sure that the value_changed() function gets called as expected for each value.

Definition at line 1781 of file conf_file.cpp.

References erase_parameter(), and f_parameters.

◆ erase_parameter()

bool advgetopt::conf_file::erase_parameter ( std::string  name)

This function can be used to remove the specified parameter from this configuration file.

If that parameter is not defined in the file, then nothing happens.

Parameters
[in]nameThe name of the parameter to remove.
Returns
true if the parameter was removed, false if it did not exist.

Definition at line 1749 of file conf_file.cpp.

References advgetopt::erased, f_modified, f_parameters, f_reading, and value_changed().

Referenced by erase_all_parameters(), and section_to_variables().

◆ exists()

bool advgetopt::conf_file::exists ( ) const

This function returns true if a file was opened for reading. Whether the file is valid is not marked in this flag.

If you want to know whether an error occurred while reading the file, try the get_errno().

Returns
true if a file was read.
See also
get_errno()

Definition at line 1187 of file conf_file.cpp.

References f_exists, and advgetopt::get_global_mutex().

◆ get_conf_file()

conf_file::pointer_t advgetopt::conf_file::get_conf_file ( conf_file_setup const setup)
static

This function creates a new conf_file object unless one with the same filename already exists.

If the configuration file was already loaded, then that pointer gets returned instead of reloading the file. There is currently no API to allow for the removal because another thread or function may have the existing pointer cached and we want all instances of a configuration file to be the same (i.e. if you update the value of a parameter then that new value should be visible by all the users of that configuration file.) Therefore, you can think of a configuration file as a global variable.

Note
Any number of call this function to load a given file always returns exactly the same pointer.
Todo:
With the communicator, we will at some point implement a class used to detect that a file changed, allowing us to get a signal and reload the file as required. This get_conf_file() function will greatly benefit from such since that way we can automatically reload the configuration file. In other words, process A could make a change, then process B reloads and sees the change that process A made. Such an implementation will require a proper locking mechanism of the configuration files while modifications are being performed. [Now that we have fluid settings, this is probably not required at all]
Parameters
[in]setupThe settings to be used in this configuration file reader.
Returns
A pointer to the configuration file data.

Definition at line 809 of file conf_file.cpp.

References advgetopt::conf_file_setup::get_config_url(), advgetopt::conf_file_setup::get_filename(), and advgetopt::get_global_mutex().

Referenced by advgetopt::getopt::parse_options_from_file(), and advgetopt::getopt::process_configuration_file().

◆ get_errno()

int advgetopt::conf_file::get_errno ( ) const

The class registers the errno value whenever an I/O error happens while handling the configuration file. In most cases the function is expected to return 0.

The ENOENT error should not happen since the setup is going to be marked as invalid when a configuration file does not exist and you should not end up creation a conf_file object when that happens. However, it is expected when you want to make some changes to a few parameters and save them back to file (i.e. the very first time there will be no file under the writable configuration folder.)

Returns
The last errno detected while accessing the configuration file.

Definition at line 1211 of file conf_file.cpp.

References f_errno, and advgetopt::get_global_mutex().

◆ get_line()

bool advgetopt::conf_file::get_line ( std::ifstream &  in,
std::string &  line 
)
private

This function reads one line. The function takes the line continuation setup in account. So for example a line that ends with a backslash continues on the next line when the line continuation is setup to Unix.

Note that by default comments are also continued. So a backslash in Unix mode continues a comment on the next line.

There is a special case with the semicolon continuation setup. When the line starts as a comment, it will end on the first standalone newline (i.e. a comment does not need to end with a semi-colon.)

Parameters
[in,out]inThe input stream.
[out]lineWhere the line gets saved.
Returns
true if a line was read, false on EOF.

Definition at line 1889 of file conf_file.cpp.

References f_line, f_setup, advgetopt::conf_file_setup::get_line_continuation(), getc(), is_comment(), advgetopt::iswspace(), advgetopt::line_continuation_fortran, advgetopt::line_continuation_msdos, advgetopt::line_continuation_rfc_822, advgetopt::line_continuation_semicolon, advgetopt::line_continuation_single_line, advgetopt::line_continuation_unix, and ungetc().

Referenced by read_configuration().

◆ get_parameter()

std::string advgetopt::conf_file::get_parameter ( std::string  name) const

This function searches for the specified parameter. If that parameter exists, then its value is returned. Note that the value of a parameter may be the empty string.

If the parameter does not exist, the function returns the empty string. To distinguish between an undefined parameter and a parameter set to the empty string, use the has_parameter() function.

Parameters
[in]nameThe name of the parameter to retrieve.
Returns
The current value of the parameter or an empty string.
See also
has_parameter()
set_parameter()

Definition at line 1345 of file conf_file.cpp.

References f_parameters, f_variables, and advgetopt::get_global_mutex().

◆ get_parameters()

conf_file::parameters_t advgetopt::conf_file::get_parameters ( ) const

This function returns a copy of the list of parameters defined in this configuration file.

Note
We return a list because in a multithread environment another thread may decide to make changes to the list of parameters (including erasing a parameter.)
Remarks
Note that the parameters, when retrieved in this way, are returned raw. This means the variables are not going to be applied to the values. You can still do so by yourself calling the process_value() function.
Returns
A copy of the list of parameters.

Definition at line 1294 of file conf_file.cpp.

References f_parameters, and advgetopt::get_global_mutex().

Referenced by section_to_variables().

◆ get_sections()

conf_file::sections_t advgetopt::conf_file::get_sections ( ) const

This function returns a copy of the list of sections defined in this configuration file. In most cases, you should not need this function since you are expected to know what parameters may be defined. There are times though when it can be very practical. For example, the options_config.cpp makes use of it since each section is a parameter which we do not know the name of until we have access to this array of sections.

Note
We return a list because in a multithread environment another thread may decide to make changes to the list of parameters which has the side effect of eventually adding a section.
Returns
A copy of the list of sections.

Definition at line 1269 of file conf_file.cpp.

References f_sections, and advgetopt::get_global_mutex().

◆ get_setup()

conf_file_setup const & advgetopt::conf_file::get_setup ( ) const

This function returns a copy of the setup used to load this configuration file.

Note
This function has no mutex protection because the setup can't change so there is no multi-thread protection necessary (the fact that you hold a shared pointer to the conf_file object is enough protection in this case.)
Returns
A reference to this configuration file setup.

Definition at line 1066 of file conf_file.cpp.

References f_setup.

◆ get_variables()

variables::pointer_t advgetopt::conf_file::get_variables ( ) const

This function returns the attached variables. This function may return a nullptr.

Returns
The variables attached to the configuration file or nullptr.

Definition at line 1246 of file conf_file.cpp.

References f_variables.

◆ getc()

int advgetopt::conf_file::getc ( std::ifstream &  in)
private

This function reads one character from the input stream and returns it as an int.

If there is an ungotten character (i.e. ungetc() was called) then that character is returned.

When the end of the file is reached, this function returns -1.

Note
This function is oblivious of UTF-8. It should not matter since any Unicode character would anyway be treated as is.
Parameters
[in,out]inThe input stream.
Returns
The character read or -1 when EOF is reached.

Definition at line 1825 of file conf_file.cpp.

References f_unget_char.

Referenced by get_line().

◆ has_parameter()

bool advgetopt::conf_file::has_parameter ( std::string  name) const

This function checks for the existance of a parameter. It is a good idea to first check for the existance of a parameter since the get_parameter() function may otherwise return an empty string and you cannot know whether that empty string means that the parameter was not defined or it was set to the empty string.

Parameters
[in]nameThe name of the parameter to check.
Returns
true if the parameter is defined, false otherwise.
See also
get_parameter()
set_parameter()

Definition at line 1317 of file conf_file.cpp.

References f_parameters, and advgetopt::get_global_mutex().

◆ is_assignment_operator()

assignment_t advgetopt::conf_file::is_assignment_operator ( char const *&  s,
bool  skip 
) const

This function checks the characters at s to know whether it matches one of the character(s) allowed as an assignment character.

Parameters
[in,out]sThe character(s) to be checked.
[in]skipWhether to position the input pointer s after the assignment character(s).
Returns
true if the character(s) at s are considered to represent an assignment character, false otherwise.

Definition at line 2251 of file conf_file.cpp.

References advgetopt::ASSIGNMENT_APPEND, advgetopt::ASSIGNMENT_NEW, advgetopt::ASSIGNMENT_NONE, advgetopt::ASSIGNMENT_OPERATOR_COLON, advgetopt::ASSIGNMENT_OPERATOR_EQUAL, advgetopt::ASSIGNMENT_OPERATOR_EXTENDED, advgetopt::ASSIGNMENT_OPERATOR_SPACE, advgetopt::ASSIGNMENT_OPTIONAL, advgetopt::ASSIGNMENT_SET, f_setup, and advgetopt::conf_file_setup::get_assignment_operator().

Referenced by read_configuration().

◆ is_comment()

bool advgetopt::conf_file::is_comment ( char const s) const

This function checks whether the s string starts with a comment.

We support different types of comment introducers. This function checks the flags as defined in the constructor and returns true if the type of character introducer defines a comment.

We currently support:

  • .ini file comments, introduced by a semi-colon (;)
  • Shell file comments, introduced by a hash character (#)
  • C++ comment, introduced by two slashes (//)
Parameters
[in]sThe string to check for a comment.
Returns
true if the string represents a comment.

Definition at line 2320 of file conf_file.cpp.

References advgetopt::COMMENT_CPP, advgetopt::COMMENT_INI, advgetopt::COMMENT_SHELL, f_setup, and advgetopt::conf_file_setup::get_comment().

Referenced by get_line(), and read_configuration().

◆ read_configuration()

void advgetopt::conf_file::read_configuration ( )
private

This function reads a configuration file and saves all the parameters it finds in a map which can later be checked against an option table for validation.

Todo:
Add support for quotes in configuration files as parameters are otherwise saved as a separated list of parameters losing the number of spaces between each entry.
Todo:
Add support for reading a backup file if the main file is not found.

Definition at line 2019 of file conf_file.cpp.

References advgetopt::ASSIGNMENT_NONE, advgetopt::ASSIGNMENT_OPERATOR_SPACE, advgetopt::COMMENT_SAVE, f_errno, f_exists, f_line, f_reading, f_setup, advgetopt::conf_file_setup::get_assignment_operator(), advgetopt::conf_file_setup::get_comment(), advgetopt::conf_file_setup::get_filename(), get_line(), advgetopt::conf_file_setup::get_section_operator(), is_assignment_operator(), is_comment(), advgetopt::iswspace(), advgetopt::SECTION_OPERATOR_BLOCK, advgetopt::SECTION_OPERATOR_INI_FILE, set_parameter(), and advgetopt::unquote().

Referenced by conf_file().

◆ remove_callback()

void advgetopt::conf_file::remove_callback ( callback_id_t  id)

This function is the opposite of the add_callback(). It removes a callback that you previously added. This is useful if you are interested in hearing about the changing values when set a first time but are not interested at all about future changes.

Parameters
[in]idThe id returned by the add_callback() function.

Definition at line 1121 of file conf_file.cpp.

References f_callbacks, and advgetopt::get_global_mutex().

◆ reset_conf_files()

void advgetopt::conf_file::reset_conf_files ( )
static

In some rare cases, you may want to get rid of the cached data and re-read all the configuration data from file. In this case, you should delete all your conf_file instances, call this function, and then do the get_conf_file() again.

This function clears the caches. If you keep existing conf_file objects around, they may not match newer instances.

This function is particularly useful when dealing with tests that verify configuration data.

Definition at line 848 of file conf_file.cpp.

References advgetopt::get_global_mutex().

◆ save_configuration()

bool advgetopt::conf_file::save_configuration ( std::string  backup_extension = std::string(".bak"),
bool  replace_backup = false,
bool  prepend_warning = true,
std::string  output_filename = std::string() 
)

This function saves the current data from this configuration file to the output file. It overwrites the existing file.

Note that when you load configuration files for the command line, you may load data from many different files. This function only handles the data found in this very file and only that data and whatever modifications you made is included in the output .

If the conf_file is not marked as modified, the function returns immediately with true.

The assignment operator used is the space if allowed, the colon if allowed, otherwise it falls back to the equal operator. At this time, the colon and equal operators are not preceeded or followed by a space (i.e. name=value).

Todo:
Fix the canonicalization of the filename on a first save. Right now, the original filename was used but the path could change when saving (see the realpath() call in the constructor; this needs to be fixed).
Parameters
[in]backup_extensionIf not empty, create a backup with that extension.
[in]replace_backupIf true and a backup exists, replace it.
[in]prepend_warningWhether to write a warning at the start of the file.
[in]output_filenameThe output filename; if empty, fallback to the filename defined in conf_file_setup.
Returns
true if the save worked as expected.

Definition at line 888 of file conf_file.cpp.

References advgetopt::ASSIGNMENT_OPERATOR_COLON, advgetopt::ASSIGNMENT_OPERATOR_SPACE, f_errno, f_modified, f_parameters, f_setup, advgetopt::conf_file_setup::get_assignment_operator(), advgetopt::conf_file_setup::get_filename(), advgetopt::conf_file_setup::get_name_separator(), and advgetopt::NAME_SEPARATOR_DASHES.

◆ section_to_variables()

int advgetopt::conf_file::section_to_variables ( std::string const section_name,
variables::pointer_t  vars 
)

This function checks for a section named section_name. If it exists, then it gets converted to a set of variables in vars and gets removed from the conf_file list of sections.

Note
The getopt has an f_variables field used to save variables. This is usually the same one that will be set in a conf_file. However, by default a conf_file is not assigned a variables object.
Parameters
[in]section_nameThe name of the section to convert to variables.
[in]varsThe variables object where the parameters are saved as variables.
Returns
-1 if the section doesn't exist or vars is a null pointer, the number of parameters converted otherwise

Definition at line 2364 of file conf_file.cpp.

References erase_parameter(), f_sections, and get_parameters().

◆ set_parameter()

bool advgetopt::conf_file::set_parameter ( std::string  section,
std::string  name,
std::string const value,
assignment_t  a = assignment_t::ASSIGNMENT_NONE,
std::string const comment = std::string() 
)

This function sets a parameter to the specified value.

The name of the value includes the section names and the name parameter concatenated with a C++ scope operator (::) in between (unless section is the empty string in which case no scope operator gets added).

When the name parameter starts with a scope parameter, the section parameter is ignored. This allows one to ignore the current section (i.e. the last '[...]' or any '<name> { ... }').

The section parameter is a list of section names separated by the C++ scope operator (::).

The name parameter may include C (.) and/or C++ (::) section separators when the configuration file supports those. Internally, those get moved to the section parameter. That allows us to verify that the number of sections is valid.

This function may be called any number of time. The last value is the one kept. While reading the configuration file, though, a warning is generated when a parameter gets overwritten since this is often the source of a problem.

In the following configuration file:

var=name
constexpr flag_t option_flags_merge()
Definition flags.h:87

the variable named var is set to twice on exit. A warning will have been generated about the fact that the variable was set twice while reading the configuration file.

The full name of the parameter (i.e. section + name) cannot include any of the following characters:

  • control characters (any character between 0x00 and 0x1F)
  • a space (0x20)
  • a backslash (\)
  • quotation ("</tt> and &lsquo;&rsquo;&lsquo;) \li comment (&rsquo;;', '#', '/') \li assignment operators ('=', ':', '?', '+') \note The \p section and \p name parameters have underscores (<tt>_</tt>) replaced with dashes (<tt>-</tt>) before getting used. The very first character can be a dash. This allows you to therefore create a form of internal parameters; i.e. parameters which cannot appear in a configuration file, an environment variable or on the command line (where parameter are not allowed to start with a dash). \warning It is important to note that when a \p name includes a C++ scope operator, the final parameter name looks like it includes a section name (i.e. the name "a::b", when the C++ section flag is not set, is accepted as is; so the final parameter name is going to be "a::b" and therefore it will include what looks like a section name.) There should not be any concern about this small glitch though since you do not have to accept any such parameter.
Todo:
The section/name combo should be dealt with inside this function instead of outside, especially if we are to support all the namespace operators.

Parameters
[in]sectionThe list of sections or an empty string.
[in]nameThe name of the parameter.
[in]valueThe value of the parameter.
[in]aThe operator used to set this parameter.
[in]commentThe comment appearing before value.
Returns
true if the parameter was modified, false if an error occurs.

Definition at line 1445 of file conf_file.cpp.

References advgetopt::ASSIGNMENT_APPEND, advgetopt::ASSIGNMENT_NEW, advgetopt::ASSIGNMENT_NONE, advgetopt::ASSIGNMENT_OPTIONAL, advgetopt::ASSIGNMENT_SET, advgetopt::created, f_line, f_modified, f_parameters, f_reading, f_sections, f_setup, advgetopt::conf_file_setup::get_filename(), advgetopt::get_global_mutex(), advgetopt::conf_file_setup::get_section_operator(), advgetopt::conf_file_setup::get_section_to_ignore(), advgetopt::SECTION_OPERATOR_C, advgetopt::SECTION_OPERATOR_CPP, advgetopt::SECTION_OPERATOR_NONE, advgetopt::SECTION_OPERATOR_ONE_SECTION, advgetopt::updated, and value_changed().

Referenced by read_configuration().

◆ set_variables()

void advgetopt::conf_file::set_variables ( variables::pointer_t  variables)

The get_parameter() of the configuration file can be transformed to apply user variables to the values of the parameters.

By default, this is not used by the getopt since it loads the values in its tables which then apply the variable when the get_value() is called on the getopt_info objects.

Note
You can detach a variables object by attaching a null pointer.
Parameters
[in]variablesThe variable to attach to this configuration file.

Definition at line 1233 of file conf_file.cpp.

References f_variables.

◆ ungetc()

void advgetopt::conf_file::ungetc ( int  c)
private

This function is used whenever we read one additional character to know whether a certain character followed another. For example, we check for a ‘’\n'whenever we find a'\r'. However, if the character right after the'\r'is not a'\n'` we call this ungetc() function so next time we can re-read that same character.

Note
You can call ungetc() only once between calls to getc(). The current buffer is just one single character. Right now our parser doesn't need more than that.
Parameters
[in]cThe character to restore.

Definition at line 1861 of file conf_file.cpp.

References f_unget_char.

Referenced by get_line().

◆ value_changed()

void advgetopt::conf_file::value_changed ( callback_action_t  action,
std::string const parameter_name,
std::string const value 
)
private

This function is called on a change of the internal values.

The function is used to call the callbacks that were added to this option_info object. The function first copies the existing list of callbacks so you can safely update the list from within a callback.

Warning
Destroying your advgetopt::getopt option is not safe while a callback is running.

Definition at line 1151 of file conf_file.cpp.

References f_callbacks, and advgetopt::get_global_mutex().

Referenced by erase_parameter(), and set_parameter().

◆ was_modified()

bool advgetopt::conf_file::was_modified ( ) const

This function returns the value of the f_modified flag which is true if any value was createed, updated, or erased from the configuration file since after it was loaded.

This tells you whether you should call the save() function, assuming you want to keep such changes.

Returns
true if changes were made to this file parameters.

Definition at line 1801 of file conf_file.cpp.

References f_modified.

Member Data Documentation

◆ f_callbacks

callback_vector_t advgetopt::conf_file::f_callbacks = callback_vector_t()
private

Definition at line 279 of file conf_file.h.

Referenced by add_callback(), remove_callback(), and value_changed().

◆ f_errno

int advgetopt::conf_file::f_errno = 0
private

Definition at line 271 of file conf_file.h.

Referenced by get_errno(), read_configuration(), and save_configuration().

◆ f_exists

bool advgetopt::conf_file::f_exists = false
private

Definition at line 273 of file conf_file.h.

Referenced by exists(), and read_configuration().

◆ f_line

int advgetopt::conf_file::f_line = 0
private

Definition at line 270 of file conf_file.h.

Referenced by get_line(), read_configuration(), and set_parameter().

◆ f_modified

bool advgetopt::conf_file::f_modified = false
private

Definition at line 275 of file conf_file.h.

Referenced by erase_parameter(), save_configuration(), set_parameter(), and was_modified().

◆ f_next_callback_id

callback_id_t advgetopt::conf_file::f_next_callback_id = 0
private

Definition at line 280 of file conf_file.h.

Referenced by add_callback().

◆ f_parameters

parameters_t advgetopt::conf_file::f_parameters = parameters_t()
private

◆ f_reading

bool advgetopt::conf_file::f_reading = false
private

Definition at line 272 of file conf_file.h.

Referenced by erase_parameter(), read_configuration(), and set_parameter().

◆ f_sections

sections_t advgetopt::conf_file::f_sections = sections_t()
private

Definition at line 276 of file conf_file.h.

Referenced by get_sections(), section_to_variables(), and set_parameter().

◆ f_setup

conf_file_setup const advgetopt::conf_file::f_setup
private

◆ f_unget_char

int advgetopt::conf_file::f_unget_char = '\0'
private

Definition at line 269 of file conf_file.h.

Referenced by getc(), and ungetc().

◆ f_variables

variables::pointer_t advgetopt::conf_file::f_variables = variables::pointer_t()
private

Definition at line 277 of file conf_file.h.

Referenced by get_parameter(), get_variables(), and set_variables().


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

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.