Index: /trunk/FACT++/src/Configuration.cc
===================================================================
--- /trunk/FACT++/src/Configuration.cc	(revision 10219)
+++ /trunk/FACT++/src/Configuration.cc	(revision 10220)
@@ -166,14 +166,25 @@
 If the second option is false, the options will not be displayed in any
 \b --help directive, but are available to the user. Each of the functions
-can be called more than once.
+can be called more than once. If an option should be available from
+all kind of inputs AddOptions() can be used which will call all
+four other AddOptions() functions.
 
 A special case are the options from environment variables. Since you might
-want to use the same option-key for the command-line and the environment
+want to use the same option-key for the command-line and the environment,
 a mapping is needed (e.g. from \b PATH to \b --path). This mapping
-can be implemented by a mapping function and be initialized like this:
+can be implemented by a mapping function or by the build in mapping
+and be initialized like this:
 
 \code
 
-   const string name_mapper(const string &str)
+   conf.AddEnv("path", "PATH");
+
+\endcode
+
+or
+
+\code
+
+   const string name_mapper(const string str)
    {
       return str=="PATH" ? "path" : "";
@@ -421,5 +432,6 @@
 //!
 //
-Configuration::Configuration(const string &prgname) : fName(prgname), fNameMapper(&NameMapper)
+Configuration::Configuration(const string &prgname) : fName(prgname),
+fNameMapper(bind1st(mem_fun(&Configuration::DefaultMapper), this))
 {
     po::options_description generic("Generic options");
@@ -665,7 +677,12 @@
 //!
 //
-void Configuration::SetNameMapper(const string (*mapper)(const string&))
-{
-    fNameMapper = mapper;
+void Configuration::SetNameMapper(const boost::function1<std::string, std::string> &func)
+{
+    fNameMapper = func;
+}
+
+void Configuration::SetNameMapper()
+{
+    fNameMapper = bind1st(mem_fun(&Configuration::DefaultMapper), this);
 }
 
@@ -902,5 +919,5 @@
     // ------------------------ (11) -------------------------
 
-    const po::parsed_options parsed_environment = po::parse_environment(opt_environment, *fNameMapper);
+    const po::parsed_options parsed_environment = po::parse_environment(opt_environment, fNameMapper);
 
     // ------------------------ (12) -------------------------
Index: /trunk/FACT++/src/Configuration.h
===================================================================
--- /trunk/FACT++/src/Configuration.h	(revision 10219)
+++ /trunk/FACT++/src/Configuration.h	(revision 10220)
@@ -3,26 +3,4 @@
 
 #include <boost/program_options.hpp>
-/*
-\attention
-\callgraph
-\callergraph
-\category
-\dot
-\remark
-\see
-\throws
-\todo
-\warning
-
-\e  italic
-\b  bold
-\c  typewriter
-
-\code
-\endcode
-
-\f$
-\f[ \f]
-*/
 
 namespace po = boost::program_options;
@@ -39,4 +17,6 @@
 
     const std::string fName; /// argv[0]
+
+    std::map<std::string, std::string> fEnvMap;
 
     po::options_description fOptionsCommandline[2]; /// Description of the command-line options
@@ -59,8 +39,11 @@
 
     /// A default mapper for environment variables skipping all of them
-    static const std::string NameMapper(const std::string &) { return ""; }
+    std::string DefaultMapper(const std::string env)
+    {
+        return fEnvMap[env];
+    }
 
     /// Pointer to the mapper function for environment variables
-    const std::string (*fNameMapper)(const std::string&);
+    boost::function1<std::string, std::string> fNameMapper;
 
     /// Helper function which return the max of the two arguments in the first argument
@@ -88,8 +71,21 @@
     void AddOptionsEnvironment(const po::options_description &env, bool visible=true);
     void AddOptionsDatabase(const po::options_description &db, bool visible=true);
+    void AddOptions(const po::options_description &opt, bool visible=true)
+    {
+        AddOptionsCommandline(opt, visible);
+        AddOptionsConfigfile(opt, visible);
+        AddOptionsEnvironment(opt, visible);
+        AddOptionsDatabase(opt, visible);
+    }
 
     void SetArgumentPositions(const po::positional_options_description &desc);
 
-    void SetNameMapper(const std::string (*mapper)(const std::string&));
+    void SetNameMapper(const boost::function1<std::string, std::string> &func);
+    void SetNameMapper();
+
+    void AddEnv(const std::string &conf, const std::string &env)
+    {
+        fEnvMap[env] = conf;
+    }
 
     // Output
