Config.cc
Go to the documentation of this file.
00001 
00005 #include <blort/Recognizer3D/ConfigFile.hh>
00006 #include <blort/Recognizer3D/Config.hh>
00007 
00008 namespace P 
00009 {
00010 
00011 Config::Config(const char *filename)
00012 {
00013   Load(filename);
00014 }
00015 
00016 void Config::Load(const char *filename)
00017 {
00018   ConfigFile file(filename);
00019   string line, name, value;
00020   string::size_type pos;
00021   while(file.GetLine(line))
00022   {
00023     pos = 0;
00024     GetWord(line, name, pos);
00025     GetWord(line, value, pos);
00026     items[name] = value;
00027   }
00028 }
00029 
00030 
00031 bool Config::ExistItem(const string &name)
00032 {
00033   map<string,string>::iterator it = items.find(name);
00034   if( it == items.end() ) return false;
00035   return true; 
00036 }
00037 
00038 }
00039 


blort
Author(s): Michael Zillich, Thomas Mörwald, Johann Prankl, Andreas Richtsfeld, Bence Magyar (ROS version)
autogenerated on Thu Jan 2 2014 11:38:25