EHS Embedded HTTP Server  1.5.0.132
datum.h
00001 /* $Id: datum.h 28 2010-06-05 03:20:36Z felfert $
00002  *
00003  * EHS is a library for embedding HTTP(S) support into a C++ application
00004  *
00005  * Copyright (C) 2004 Zachary J. Hansen
00006  *
00007  * Code cleanup, new features and bugfixes: Copyright (C) 2010 Fritz Elfert
00008  *
00009  *    This library is free software; you can redistribute it and/or
00010  *    modify it under the terms of the GNU Lesser General Public
00011  *    License version 2.1 as published by the Free Software Foundation;
00012  *
00013  *    This library is distributed in the hope that it will be useful,
00014  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  *    Lesser General Public License for more details.
00017  *
00018  *    You should have received a copy of the GNU Lesser General Public
00019  *    License along with this library; if not, write to the Free Software
00020  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  *    This can be found in the 'COPYING' file.
00023  *
00024  */
00025 
00026 #ifndef DATUM_H
00027 #define DATUM_H
00028 
00029 #include <string>
00030 
00032 
00036 class Datum {
00037 
00038     protected:
00039 
00041         std::string sDatum;
00042 
00043     public:
00045         Datum ( ) : sDatum ( "" ) { }
00046 
00048         Datum ( const Datum & other ) : sDatum( other.sDatum ) { }
00049 
00051         Datum & operator=( const Datum & other );
00052 
00054         Datum & operator= ( unsigned long inUL );
00055 
00057         Datum & operator= ( long inLong );
00058 
00060         Datum & operator= ( int inInt );
00061 
00063         Datum & operator= ( double inDouble );
00064 
00066         Datum & operator= ( std::string isString );
00067 
00069         Datum & operator= ( char * ipsString );
00070 
00072         Datum & operator= ( const char * ipsString );
00073 
00075         Datum & operator= ( void * ipVoid );
00076 
00078         bool operator== ( const char * ipsString );
00079 
00081         operator int ( );
00082 
00084         int GetInt() { return (int)(*this); }
00085 
00087         operator unsigned long ( );
00088 
00090         operator long ( );
00091 
00093         operator double ( );
00094 
00096         operator std::string ( );
00097 
00099         operator const char * ( );
00100 
00102         const char * GetCharString ( ) { return (const char*)(*this); }
00103 
00104 
00106         bool operator!= ( int );
00107 
00109         bool operator!= ( const char * );
00110 
00111 };
00112 
00113 #endif // DATUM_H