Webmaster  |  Imprint 
C++ Server Pages
Main  |  License  |  Documentation  |  Download 

/home/tommi/tntdb/include/tntdb/iface/ivalue.h

00001 /*
00002  * Copyright (C) 2005 Tommi Maekitalo
00003  * 
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  * 
00009  * As a special exception, you may use this file as part of a free
00010  * software library without restriction. Specifically, if other files
00011  * instantiate templates or use macros or inline functions from this
00012  * file, or you compile this file and link it with other files to
00013  * produce an executable, this file does not by itself cause the
00014  * resulting executable to be covered by the GNU General Public
00015  * License. This exception does not however invalidate any other
00016  * reasons why the executable file might be covered by the GNU Library
00017  * General Public License.
00018  * 
00019  * This library 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  * Lesser General Public License for more details.
00023  * 
00024  * You should have received a copy of the GNU Lesser General Public
00025  * License along with this library; if not, write to the Free Software
00026  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00027  */
00028 
00029 #ifndef TNTDB_IFACE_IVALUE_H
00030 #define TNTDB_IFACE_IVALUE_H
00031 
00032 #include <cxxtools/refcounted.h>
00033 #include <string>
00034 #include <stdint.h>
00035 
00036 namespace tntdb
00037 {
00038   class Date;
00039   class Time;
00040   class Datetime;
00041   class Decimal;
00042   class Blob;
00043   
00045   class IValue : public cxxtools::RefCounted
00046   {
00047     public:
00048       virtual bool isNull() const = 0;
00049       virtual bool getBool() const = 0;
00050       virtual int getInt() const = 0;
00051       virtual unsigned getUnsigned() const = 0;
00052       virtual int32_t getInt32() const = 0;
00053       virtual uint32_t getUnsigned32() const = 0;
00054       virtual int64_t getInt64() const = 0;
00055       virtual uint64_t getUnsigned64() const = 0;
00056       virtual Decimal getDecimal() const = 0;
00057       virtual float getFloat() const = 0;
00058       virtual double getDouble() const = 0;
00059       virtual char getChar() const = 0;
00060       virtual void getString(std::string& ret) const = 0;
00061       virtual void getBlob(Blob& ret) const = 0;
00062       virtual Date getDate() const = 0;
00063       virtual Time getTime() const = 0;
00064       virtual Datetime getDatetime() const = 0;
00065   };
00066 }
00067 
00068 #endif // TNTDB_IFACE_IVALUE_H
00069 
Copyright © 2008 The Tntnet Development Team
Tntnet 1.6