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

rtkinput.h

00001 /*<<<<<COPYRIGHT*/
00002 /*
00003  * RTK The report toolkit
00004  * Copyright (C) 2003 Francisco Santiago Capel Torres
00005 
00006  * rtkinput.h RTK input object
00007  * 
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program 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
00016  * GNU General Public License for more details.
00017  *
00018  */
00019 /*>>>>>COPYRIGHT*/
00020 #ifndef RTKINPUT_H
00021 #define RTKINPUT_H
00022 
00023 #include "rtknamespace.h"
00024 #include "rtkvariant.h"
00025 #include "rtkinputfield.h"
00026 
00027 //#include <qxml.h>
00028 class QXmlAttributes;
00029 
00030 namespace RTK {
00031 
00032 class Input {
00033 /*<<<<<INPUT_CONSTRUCTOR*/
00034 public:
00035         Input(const String& name = String::null, const String& driver = String::null)
00036         :mName(name), mDriver(driver)
00037 /*>>>>>INPUT_CONSTRUCTOR*/
00038     {};
00039     virtual ~Input() {};
00040     virtual bool init() = 0;
00041     virtual bool next() = 0;
00042     virtual Variant getValue(uint /*i*/) { return Variant(); }
00043     virtual Variant getValue(const String &/*fldname*/) { return Variant(); }
00044     virtual bool parseAttrs(const QXmlAttributes&) { return true; };
00045         
00046     InputField *getInputField(const String &name) const;
00047     InputField *getInputField(int i) const { return mInputFields[i]; }
00048     int insertInputField(InputField *inputfield);
00049 
00050 /*<<<<<INPUT_GETSET*/
00051 public:
00053         const String& getName() const { return mName; };
00055         void setName(const String& name) { mName = name; };
00057         const String& getDriver() const { return mDriver; };
00058 protected:
00059         String mName;
00060         String mDriver;
00061 /*>>>>>INPUT_GETSET*/
00062 
00063 protected:
00064     QValueList<InputField *> mInputFields;
00065 };
00066 
00067 }; // namespace
00068 
00069 #endif

Generated on Tue Feb 22 14:44:37 2005 for RTK. Report ToolKit by  doxygen 1.3.9.1