Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00021
00022 #include "icl_core_config/Config.h"
00023
00024 #include <iostream>
00025
00026 namespace icl_core {
00027 namespace config {
00028
00029 const char * CONFIGFILE_CONFIG_KEY = "/configfile";
00030
00031 void dump()
00032 {
00033 ConfigManager::instance().dump();
00034 }
00035
00036 void debugOutCommandLine(int argc, char *argv[])
00037 {
00038 for (int j = 0; j < argc; j++)
00039 {
00040 std::cout << argv[j] << " ";
00041 }
00042 std::cout << std::endl;
00043 }
00044
00045 ConfigIterator find(const ::icl_core::String& query)
00046 {
00047 return ConfigManager::instance().find(query);
00048 }
00049
00050 bool initialize(int& argc, char *argv[], bool remove_read_arguments)
00051 {
00052 return initialize(argc, argv,
00053 remove_read_arguments ? Getopt::eCLC_Cleanup : Getopt::eCLC_None,
00054 Getopt::ePRC_Strict);
00055 }
00056
00057 bool initialize(int& argc, char *argv[], Getopt::CommandLineCleaning cleanup,
00058 Getopt::ParameterRegistrationCheck registration_check)
00059 {
00060
00061 ConfigManager::instance();
00062
00063 bool res = Getopt::instance().initialize(argc, argv, cleanup, registration_check);
00064 if (res)
00065 {
00066 res = ConfigManager::instance().initialize();
00067 }
00068 return res;
00069 }
00070
00071 }}