NeoPZ
Public Member Functions | Public Attributes | List of all members
clarg::args_container Class Reference

Public Member Functions

void register_argument (arg_base *arg)
 
void arguments_descriptions (ostream &os, string prefix, string suffix)
 
void list_arguments (ostream &os, bool defined_only)
 
int parse_arguments_from_file (std::istream &is)
 
int parse_arguments (int argc, char *argv[])
 

Public Attributes

MAP< string, arg_base * > args
 
string prog_name
 

Detailed Description

Arguments container. All the arguments are added into this object.

Definition at line 38 of file arglib.cpp.

Member Function Documentation

◆ arguments_descriptions()

void clarg::args_container::arguments_descriptions ( ostream &  os,
string  prefix,
string  suffix 
)
inline

Definition at line 48 of file arglib.cpp.

References clarg::arg_base::get_desc(), and clarg::arg_base::get_name().

Referenced by clarg::arguments_descriptions().

◆ list_arguments()

void clarg::args_container::list_arguments ( ostream &  os,
bool  defined_only 
)
inline

Definition at line 57 of file arglib.cpp.

Referenced by clarg::dump_arguments_to_file(), and clarg::values().

◆ parse_arguments()

int clarg::args_container::parse_arguments ( int  argc,
char *  argv[] 
)
inline

◆ parse_arguments_from_file()

int clarg::args_container::parse_arguments_from_file ( std::istream &  is)
inline

Read the arguments from file. Returns 0 if ok, != 0 otherwise. TODO: this is not implemented yet. The goal of this method is to parser all the arguments from an argument file. In this way, you may dump all the arguments used in a given run and re-use them by parsing from the file. To do so, you may infoke this method.

Definition at line 80 of file arglib.cpp.

Referenced by clarg::parse_arguments_from_file().

◆ register_argument()

void clarg::args_container::register_argument ( arg_base arg)
inline

Definition at line 41 of file arglib.cpp.

References DEBUG_AL, clarg::arg_base::get_desc(), and clarg::arg_base::get_name().

Referenced by clarg::arg_base::arg_base().

Member Data Documentation

◆ args

MAP<string, arg_base*> clarg::args_container::args

Definition at line 145 of file arglib.cpp.

◆ prog_name

string clarg::args_container::prog_name

Definition at line 147 of file arglib.cpp.


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