Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

omXMLParameters.h

Go to the documentation of this file.
00001 
00002 // This code is part of the MaiaProject free software
00003 //
00004 // Keyboard and Mouse Emulator - Virtual keyboard Engine
00005 //
00006 // Copyright (c) 2002-2003 Luca Clivio <luca.clivio@maiaproject.org>
00007 // Tel. +39-347-2538040
00008 // via B.Croce 2, 20037 Paderno Dugnano (Milano) - Italy
00009 //
00010 // Developers:
00011 //    Simone Mangano <simone.mangano@maiaproject.org>
00012 //    Andrea Tosato  <andrea.tosato@maiaproject.org>
00013 //
00014 //  -----------------------------------------------------------------------------
00015 //  This program is free software; This program is free software; 
00016 //  you can redistribute it and/or modify it under the terms of the 
00017 //  GNU General Public License as published by the Free Software Foundation; 
00018 //  either version 2 of the License, or (at your option) any later version.
00019 //  but WITHOUT ANY WARRANTY; without even the implied warranty of                              
00020 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the                                
00021 //  GNU General Public License for more details.                                                
00022 //  You should have received a copy of the GNU General Public License                           
00023 //  along with this program; if not, write to the Free Software                                 
00024 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                                   
00026 
00027 
00028 #ifndef _omXMLParameters_
00029 #define _omXMLParameters_
00030 
00031 #include <openmaia/config.h>
00032 #include <openmaia/omXMLParameter.h>
00033 #include <openmaia/omFunctions.h>
00034 
00035 #include <wx/wx.h>
00036 #include <sstream>
00037 #include <iostream>
00038 #include <vector>
00039 
00040 
00047 class omXMLParameters {
00048  protected:
00049   // -- variables
00050   std::vector<omXMLParameter > parameters ;   // parameters of the key
00051   int num;   // number of stored parameterss
00052   int cur ;  // current parameter in automatic mode
00053 
00054  public:
00055   // -- methods
00056 
00057   // constructor
00058   omXMLParameters() ;
00059   // add a new parameter
00060   bool AddParameter( wxString, wxString) ;
00061   // get parameter value by name
00062   wxString GetValue( wxString ) ;
00063   // gete parameter value as integer by name
00064   int GetIntValue( wxString ) ;
00065   // get parameter name by id
00066   wxString GetName( int ) ;
00067   // get parameter value by id
00068   wxString GetValue( int ) ;
00069   // get parameter value in lowercase by id
00070   wxString GetLowerValue( int) ;
00071   // get parameter value in lowercase by name
00072   wxString GetLowerValue( wxString) ;
00073   // get parameter name in lowercase by id
00074   wxString GetLowerName( int ) ;
00075   // get number of parameters
00076   int GetParsNumber() ;
00077   // get next parameter
00078   omXMLParameter GetNextParameter() ;
00079   // reset parameter counter
00080   void ResetCounter() ;
00081   
00082 } ;
00083 
00084 
00085 #endif