lib

argument.h

00001 /***************************************************************************
00002  * argument.h
00003  * This file is part of the KDE project
00004  * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
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 GNU
00013  * Library General Public License for more details.
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this program; see the file COPYING.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  ***************************************************************************/
00019 
00020 #ifndef KROSS_API_ARGUMENT_H
00021 #define KROSS_API_ARGUMENT_H
00022 
00023 #include <qstring.h>
00024 #include <qvaluelist.h>
00025 
00026 #include "object.h"
00027 
00028 namespace Kross { namespace Api {
00029 
00030     // Forward declaration.
00031     class ArgumentList;
00032 
00038     class Argument
00039     {
00040         public:
00041 
00048             explicit Argument(const QString& classname = QString::null /*, Object::Ptr object = 0, bool visible = true*/ );
00049 
00053             ~Argument();
00054 
00060             const QString& getClassName();
00061 
00070             //Object::Ptr getObject() const;
00071 
00076             //bool isVisible() const;
00077 
00088             ArgumentList& operator << (ArgumentList& arglist);
00089 
00090         private:
00092             QString m_classname;
00094             //Object::Ptr m_object;
00096             //bool m_visible;
00097     };
00098 
00103     class ArgumentList
00104     {
00105         public:
00106 
00110             ArgumentList();
00111 
00115             ~ArgumentList();
00116 
00124             operator QValueList<Argument>& () { return m_arguments; }
00125 
00132             ArgumentList& operator << (const Argument& arg);
00133 
00139             //uint getMinParams() const;
00140 
00146             //uint getMaxParams() const;
00147 
00152             //QString toString();
00153 
00154         private:
00156             //uint m_minparams;
00158             //uint m_maxparams;
00160             QValueList<Argument> m_arguments;
00161     };
00162 
00163 }}
00164 
00165 #endif
00166 
KDE Home | KDE Accessibility Home | Description of Access Keys