MOOS 0.2375
|
00001 00002 // 00003 // MOOS - Mission Oriented Operating Suite 00004 // 00005 // A suit of Applications and Libraries for Mobile Robotics Research 00006 // Copyright (C) 2001-2005 Massachusetts Institute of Technology and 00007 // Oxford University. 00008 // 00009 // This software was written by Paul Newman at MIT 2001-2002 and Oxford 00010 // University 2003-2005. email: pnewman@robots.ox.ac.uk. 00011 // 00012 // This file is part of a MOOS Core Component. 00013 // 00014 // This program is free software; you can redistribute it and/or 00015 // modify it under the terms of the GNU General Public License as 00016 // published by the Free Software Foundation; either version 2 of the 00017 // License, or (at your option) any later version. 00018 // 00019 // This program is distributed in the hope that it will be useful, 00020 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00022 // General Public License for more details. 00023 // 00024 // You should have received a copy of the GNU General Public License 00025 // along with this program; if not, write to the Free Software 00026 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00027 // 02111-1307, USA. 00028 // 00030 // ProcessConfigReader.h: interface for the CProcessConfigReader class. 00031 // 00033 00034 #if !defined(PROCESSCONFIGREADERH) 00035 #define PROCESSCONFIGREADERH 00036 00037 #if _MSC_VER > 1000 00038 #pragma once 00039 #endif // _MSC_VER > 1000 00040 00041 #include "MOOSFileReader.h" 00042 00043 #include <string> 00044 #include <list> 00045 #include <vector> 00046 00047 typedef std::list<std::string> STRING_LIST; 00048 00050 class CProcessConfigReader : public CMOOSFileReader 00051 { 00052 public: 00053 00054 CProcessConfigReader(); 00055 virtual ~CProcessConfigReader(); 00056 00058 std::string GetAppName(); 00059 00061 std::string GetFileName(); 00062 00064 void SetAppName(std::string sAppName); 00065 00067 bool GetConfigurationParam(std::string sAppName,std::string sParam,std::string &sVal); 00068 00070 bool GetConfigurationParam(std::string sAppName,std::string sParam, double & dfVal); 00071 00073 bool GetConfigurationParam(std::string sAppName,std::string sParam, float & fVal); 00074 00076 bool GetConfigurationParam(std::string sAppName, std::string sParam, bool & bVal); 00077 00079 bool GetConfigurationParam(std::string sAppName, std::string sParam, int & nVal); 00080 00082 bool GetConfigurationParam(std::string sAppName, std::string sParam, unsigned int & nVal); 00083 00085 bool GetConfigurationParam(std::string sParam,std::string &sVal); 00086 00088 bool GetConfigurationParam(std::string sParam, double & dfVal); 00089 00091 bool GetConfigurationParam(std::string sParam, float & fVal); 00092 00094 bool GetConfigurationParam(std::string sParam, bool & bVal); 00095 00097 bool GetConfigurationParam(std::string sParam, int & nVal); 00098 00100 bool GetConfigurationParam(std::string sParam, unsigned int & nVal); 00101 00103 bool GetConfigurationParam(std::string sParam,std::vector<double> & Vec,int & nRows,int & nCols); 00104 00106 bool GetConfiguration(std::string sAppName,STRING_LIST & Params); 00107 00109 std::string m_sAppName; 00110 00111 }; 00112 00113 #endif // !defined(AFX_PROCESSCONFIGREADER_H__CA9A3D99_64A5_4BDC_B89A_301324D37330__INCLUDED_)