Main Page | Namespace List | Alphabetical List | Class List | Directories | File List | Class Members | File Members

ConfigLoader.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   SpikeStream Library                                                   *
00003  *   Copyright (C) 2007 by David Gamez                                     *
00004  *   david@davidgamez.eu                                                   *
00005  *   Version 0.1                                                           *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022 
00023 #ifndef CONFIGLOADER_H
00024 #define CONFIGLOADER_H
00025 
00026 //Other includes
00027 #include <iostream>
00028 #include <fstream>
00029 #include <map>
00030 #include <string>
00031 using namespace std;
00032 
00033 
00034 //--------------------------- Config Loader---------------------------------
00035 /*! Loads the configuration from the specified file. */
00036 //--------------------------------------------------------------------------
00037 
00038 class ConfigLoader{
00039 
00040         public:
00041                 ConfigLoader(string);
00042                 ~ConfigLoader();
00043                 const char* getCharData(string);
00044                 string getStringData(string);
00045 
00046 
00047         private:
00048                 //=========================== VARIABLES =======================================
00049                 /*! Holds the configuration parameters loaded from the file.*/
00050                 map<string, string> configMap;
00051 
00052 
00053                 //============================ METHODS ========================================
00054                 /*! Declare copy constructor private so it cannot be used inadvertently.*/
00055                 ConfigLoader(const ConfigLoader&);
00056 
00057                 /*! Declare assignment private so it cannot be used inadvertently.*/
00058                 ConfigLoader operator = (const ConfigLoader&);
00059 
00060                 void printConfig();
00061 
00062 };
00063 
00064 
00065 #endif//CONFIGLOADER_H

Generated on Mon Sep 3 22:18:50 2007 for SpikeStream Library by  doxygen 1.4.4