CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SimpleOptionsParser Class Reference

#include <options.h>

Inheritance diagram for SimpleOptionsParser:
Collaboration diagram for SimpleOptionsParser:

Public Member Functions

 SimpleOptionsParser (OptionsTemplateManager *opt_templ_mgr_param=NULL)
 
virtual void ParsePath (const std::string &config_file, const bool external __attribute__((unused)))
 
bool TryParsePath (const std::string &config_file)
 
- Public Member Functions inherited from OptionsManager
 OptionsManager (OptionsTemplateManager *opt_templ_mgr_param)
 
 OptionsManager (const OptionsManager &opt_mgr)
 
virtual ~OptionsManager ()
 
void SwitchTemplateManager (OptionsTemplateManager *opt_templ_mgr_param)
 
virtual void ParsePath (const std::string &config_file, const bool external)=0
 
void ParseDefault (const std::string &fqrn)
 
void ClearConfig ()
 
bool IsDefined (const std::string &key)
 
bool GetValue (const std::string &key, std::string *value) const
 
std::string GetValueOrDie (const std::string &key)
 
bool GetSource (const std::string &key, std::string *value)
 
bool IsOn (const std::string &param_value) const
 
bool IsOff (const std::string &param_value) const
 
std::vector< std::string > GetAllKeys ()
 
std::vector< std::string > GetEnvironmentSubset (const std::string &key_prefix, bool strip_prefix)
 
std::string Dump ()
 
bool HasConfigRepository (const std::string &fqrn, std::string *config_path)
 
void ProtectParameter (const std::string &param)
 
void SetValue (const std::string &key, const std::string &value)
 
void UnsetValue (const std::string &key)
 
void set_taint_environment (bool value)
 

Additional Inherited Members

- Protected Member Functions inherited from OptionsManager
std::string TrimParameter (const std::string &parameter)
 
std::string SanitizeParameterAssignment (std::string *line, std::vector< std::string > *tokens)
 
void PopulateParameter (const std::string &param, const ConfigValue val)
 
void ParseValue (const std::string param, ConfigValue *val)
 
void UpdateEnvironment (const std::string &param, ConfigValue val)
 
- Protected Attributes inherited from OptionsManager
std::map< std::string,
ConfigValue
config_
 
std::map< std::string,
std::string > 
protected_parameters_
 
std::map< std::string,
std::string > 
templatable_values_
 
OptionsTemplateManageropt_templ_mgr_
 
bool taint_environment_
 

Detailed Description

Derived class from OptionsManager. This class provides a so-called fast parsing procedure which does not create a fork of the process and only retrieves those options of the configuration file which strictly are in the following format:

"KEY=VALUE".

No comments (#) are allowed.

Note
In order to use this parse it is necessary to execute the program with the "-o simple_options_parsing" flag
If using IgProf profiling tool it is necessary to use this parser in order to avoid a fork

Definition at line 246 of file options.h.

Constructor & Destructor Documentation

SimpleOptionsParser::SimpleOptionsParser ( OptionsTemplateManager opt_templ_mgr_param = NULL)
inlineexplicit

Definition at line 248 of file options.h.

Member Function Documentation

virtual void SimpleOptionsParser::ParsePath ( const std::string &  config_file,
const bool external   __attribute__(unused) 
)
inlinevirtual

Definition at line 251 of file options.h.

bool SimpleOptionsParser::TryParsePath ( const std::string &  config_file)

Definition at line 110 of file options.cc.

Referenced by cvmcache_options_parse(), cvmfs_options_parse(), StatisticsDatabase::GcExtendedStats(), StatisticsDatabase::GetDBParams(), receiver::GetParamsFromFile(), and anonymous_namespace{cmd_sub.cc}::SwissknifeSubscriber::Init().

Here is the call graph for this function:

Here is the caller graph for this function:


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