diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2013-05-17 12:45:40 -0500 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2013-05-17 12:45:40 -0500 |
commit | 359294c33620c8328d61f67635046d7cc060530c (patch) | |
tree | f2ac08fdad8860f7bc1ac76203e31013a799fda7 /tdelirc/tdelirc/prototype.h | |
parent | 7be7990fc5770d2cbcd937772e8239167b5900c6 (diff) | |
download | tdeutils-359294c33620c8328d61f67635046d7cc060530c.tar.gz tdeutils-359294c33620c8328d61f67635046d7cc060530c.zip |
Rename kdessh -> tdessh and kdelirc -> tdelirc.
Diffstat (limited to 'tdelirc/tdelirc/prototype.h')
-rw-r--r-- | tdelirc/tdelirc/prototype.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tdelirc/tdelirc/prototype.h b/tdelirc/tdelirc/prototype.h new file mode 100644 index 0000000..fa101b7 --- /dev/null +++ b/tdelirc/tdelirc/prototype.h @@ -0,0 +1,54 @@ +// +// +// C++ Interface: $MODULE$ +// +// Description: +// +// +// Author: Gav Wood <gav@kde.org>, (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef PROTOTYPE_H +#define PROTOTYPE_H + +#include <tqstringlist.h> +#include <tqpair.h> +#include <tqstring.h> + +/** +@author Gav Wood +*/ + +class Prototype +{ + TQString original, theName, theReturn; + TQStringList theNames, theTypes; + + void parse(); + +public: + unsigned count() const{ return theTypes.count(); } + const TQPair<TQString, TQString> operator[](int i) const { return tqMakePair(theTypes[i], theNames[i]); } + const TQString &name(int i) const { return theNames[i]; } + const TQString &type(int i) const { return theTypes[i]; } + const TQString &returnType() const { return theReturn; } + const TQString &name() const { return theName; } + const TQString &prototype() const { return original; } + const TQString argumentList() const; + const TQString argumentListNN() const; + const int argumentCount() { return theTypes.count(); } + const TQString prototypeNR() const { return theName + "(" + argumentListNN() + ")"; } + + void setPrototype(const TQString &source) { original = source; parse(); } + + Prototype &operator=(const TQString &source) { setPrototype(source); return *this; } + + Prototype(const TQString &source); + Prototype(); + ~Prototype(); + +}; + +#endif |