5 #ifndef CVMFS_OPTIONS_H_
6 #define CVMFS_OPTIONS_H_
15 #ifdef CVMFS_NAMESPACE_GUARD
16 namespace CVMFS_NAMESPACE_GUARD {
24 void SetTemplate(std::string name, std::string val);
25 std::string GetTemplate(std::string name);
26 bool HasTemplate(std::string name);
27 bool ParseString(std::string *input);
50 : taint_environment_(true) {
51 if (opt_templ_mgr_param != NULL) {
52 opt_templ_mgr_ = opt_templ_mgr_param;
68 delete opt_templ_mgr_;
85 virtual void ParsePath(
const std::string &config_file,
86 const bool external) = 0;
91 void ParseDefault(
const std::string &fqrn);
104 bool IsDefined(
const std::string &key);
113 bool GetValue(
const std::string &key, std::string *value)
const;
122 std::string GetValueOrDie(
const std::string &key);
132 bool GetSource(
const std::string &key, std::string *value);
140 bool IsOn(
const std::string ¶m_value)
const;
148 bool IsOff(
const std::string ¶m_value)
const;
155 std::vector<std::string> GetAllKeys();
161 std::vector<std::string> GetEnvironmentSubset(
162 const std::string &key_prefix,
175 bool HasConfigRepository(
const std::string &fqrn, std::string *config_path);
181 void ProtectParameter(
const std::string ¶m);
186 void SetValue(
const std::string &key,
const std::string &value);
192 void SetValueFromTalk(
const std::string &key,
const std::string &value);
197 void UnsetValue(
const std::string &key);
211 std::string TrimParameter(
const std::string ¶meter);
212 std::string SanitizeParameterAssignment(std::string *line,
213 std::vector <std::string> *tokens);
214 void PopulateParameter(
const std::string ¶m,
const ConfigValue val);
215 void ParseValue(
const std::string param,
ConfigValue *val);
216 void UpdateEnvironment(
258 const std::string &config_file,
260 (void) TryParsePath(config_file);
263 bool TryParsePath(
const std::string &config_file);
278 void ParsePath(
const std::string &config_file,
const bool external);
283 #ifdef CVMFS_NAMESPACE_GUARD
287 #endif // CVMFS_OPTIONS_H_
static const char * kTemplateIdentOrg
static const char * kTemplateIdentFqrn
OptionsManager(OptionsTemplateManager *opt_templ_mgr_param)
void set_taint_environment(bool value)
std::map< std::string, std::string > protected_parameters_
std::map< std::string, std::string > templatable_values_
OptionsTemplateManager * opt_templ_mgr_
BashOptionsManager(OptionsTemplateManager *opt_templ_mgr_param=NULL)
assert((mem||(size==0))&&"Out Of Memory")
struct cvmcache_object_info __attribute__
std::map< std::string, ConfigValue > config_
SimpleOptionsParser(OptionsTemplateManager *opt_templ_mgr_param=NULL)
std::map< std::string, std::string > templates_
virtual void ParsePath(const std::string &config_file, const bool external __attribute__((unused)))
OptionsManager(const OptionsManager &opt_mgr)
virtual ~OptionsManager()