Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osqltable.h

Go to the documentation of this file.
00001 #ifndef OSQL_TABLE_H
00002 #define OSQL_TABLE_H
00003 
00004 #include <qstring.h>
00005 #include <qvaluelist.h>
00006 #include <qvariant.h>
00007 
00008 namespace Opie {
00009 namespace DB {
00014 class OSQLTableItem {
00015 public:
00016     typedef QValueList<OSQLTableItem> ValueList;
00020     enum Type { Undefined=-1, Integer=0, BigInteger =1,
00021                 Float = 2, VarChar = 4 };
00028     OSQLTableItem();
00029     OSQLTableItem( enum Type type,
00030                    const QString& fieldName,
00031                    const QVariant& var= QVariant() );
00032 
00036     OSQLTableItem( const OSQLTableItem& );
00037 
00041     ~OSQLTableItem();
00042 
00043     OSQLTableItem& operator=( const OSQLTableItem& );
00044 
00048     QString fieldName() const;
00049 
00053     Type type() const;
00054     QVariant more() const;
00055 private:
00056     class OSQLTableItemPrivate;
00057     OSQLTableItemPrivate* d;
00058     Type m_type;
00059     QString m_field;
00060     QVariant m_var;
00061 };
00062 
00066 class OSQLTable  {
00067 public:
00068     typedef QValueList<OSQLTable> ValueList;
00069 
00073     OSQLTable(const QString& tableName = QString::null);
00074 
00078     ~OSQLTable();
00079 
00083     void setColumns( const OSQLTableItem::ValueList& );
00084 
00088     OSQLTableItem::ValueList columns() const;
00089 
00090     QString tableName()const;
00091 
00092 private:
00093     QString m_table;
00094     OSQLTableItem::ValueList m_list;
00095     class Private;
00096     Private *d;
00097 };
00098 
00099 }
00100 }
00101 
00102 #endif

Generated on Sat Nov 5 16:16:11 2005 for OPIE by  doxygen 1.4.2