00001 /*
00002 * MySQLaux - auxiliary classes for communication with MySQL databases
00003 * Copyright © 2001 Thomas Langen (mailto:langen@langensoft.com)
00004 *
00005 * This program is free software; you can redistribute it and/or modify
00006 * it under the terms of the GNU General Public License as published by
00007 * the Free Software Foundation; either version 2 of the License, or
00008 * (at your option) any later version.
00009 *
00010 * This program is distributed in the hope that it will be useful,
00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013 * GNU General Public License for more details.
00014 *
00015 * You should have received a copy of the GNU General Public License
00016 * along with this program; if not, write to the Free Software
00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00018 *
00019 * $Source: Field.h $
00020 * $Id: Field.h 1.3 Wed, 28 Mar 2001 09:26:44 +0200 langen $
00021 * $ProjectHeader: MySQLaux 0.6 Fri, 06 Apr 2001 10:30:48 +0200 langen $
00022 */
00023
00024 #ifndef __MySQLaux_Field_h__
00025 #define __MySQLaux_Field_h__
00026
00027 #include <string>
00028
00029 namespace MySQLaux
00030 {
00035 class Field
00036 {
00037 private:
00038 string const _name; // type name
00039 protected:
00040 bool const _is_null; // null flag
00046 Field (string const & name,
00047 bool const is_null = false)
00048 : _name (name),
00049 _is_null (is_null)
00050 {
00051 }
00052
00053 public:
00057 virtual ~Field()
00058 {
00059 }
00060
00064 virtual string to_string () const = 0;
00065
00069 virtual size_t size () const = 0;
00070
00074 string const & name () const { return _name; }
00075 };
00076 }
00077
00078 #endif // __MySQLaux_Field_h__
00079
00080 /*
00081 * Local Variables:
00082 * mode: C++
00083 * fill-column: 80
00084 * c-comment-continuation-stars: " * "
00085 * End:
00086 */
1.2.5 written by Dimitri van Heesch,
© 1997-2001