C++/Common/Enviroment/CommonEnviromentParseElement.h

Go to the documentation of this file.
00001 /* $Id: CommonEnviromentParseElement.h,v 1.4 2005/06/10 07:49:02 pfb Exp $ */
00002 
00003 #ifndef _CommonEnviromentParseElement_h
00004 #define _CommonEnviromentParseElement_h
00005 
00010 #include <string>
00011 
00015 class CommonEnviromentParseElement
00016   {
00017   /*--------------------------------------------------------------------------*/
00018                               public:
00019   
00020   enum Rvalue_type
00021     {
00022     NUMERIC,
00023     ALPHA
00024     };
00025     
00031   CommonEnviromentParseElement(std::string key, double rvalue);
00032 
00038   CommonEnviromentParseElement(std::string key, std::string rvalue); 
00039 
00044   CommonEnviromentParseElement(const CommonEnviromentParseElement& rhs);
00045 
00049   virtual ~CommonEnviromentParseElement();
00050 
00056   CommonEnviromentParseElement&
00057     operator=(const CommonEnviromentParseElement& rhs); 
00058 
00064   bool operator==(const CommonEnviromentParseElement& e) const;
00065 
00071   bool operator!=(const CommonEnviromentParseElement& e) const;   
00072 
00077   Rvalue_type Type() const;
00078 
00083   std::string Lvalue() const;
00084 
00089   double Numeric() const;
00090 
00095   std::string Alpha() const;
00096 
00097   /*--------------------------------------------------------------------------*/
00098                              private:
00099   
00100   Rvalue_type    type;
00101   std::string    lvalue;
00102   std::string    alpha;
00103   double         numeric;
00104   };
00105 
00109 #endif // _CommonEnviromentParseElement_h
00110