diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch) | |
tree | 9047cf9e6b5c43878d5bf82660adae77ceee097a /mpeglib/example/yaf/yafcore/commandTable.h | |
download | tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.tar.gz tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'mpeglib/example/yaf/yafcore/commandTable.h')
-rw-r--r-- | mpeglib/example/yaf/yafcore/commandTable.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/mpeglib/example/yaf/yafcore/commandTable.h b/mpeglib/example/yaf/yafcore/commandTable.h new file mode 100644 index 00000000..75dd4325 --- /dev/null +++ b/mpeglib/example/yaf/yafcore/commandTable.h @@ -0,0 +1,82 @@ +/* + valid Commands for Input/Output + Copyright (C) 1998 Martin Vogt + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Library General Public License as published by + the Free Software Foundation. + + For more information look at the file COPYRIGHT in this package + + */ + + + +#ifndef __COMMANDTABLE_H +#define __COMMANDTABLE_H + + +extern"C" { +#include <string.h> +#include <stdio.h> +} + +#include <kdemacros.h> + +#define _CT_START 40 + + + + + + +struct CommandDescriptionStruct { + + int lexternalUse; // written when user enters "help" + + // this field can be used to deliver a delayed return msg + int lReturn; // true generate ret-msg automatically + + const char* longName; + const char* shortName; + int number; + const char* help; +}; + + +typedef struct CommandDescriptionStruct CommandDescription; + + +class KDE_EXPORT CommandTable { + + int nCommandDesc; + CommandDescription commandDesc[50]; + + public: + CommandTable(); + virtual ~CommandTable(); + void insert(CommandDescription* cmdDesc); + + + int getNr(const char* name); + const char* getCommand(const char* name); + const char* getCommand(int nr); + const char* getArgs(const char* command,const char* wholeLine); + + int getReturnFlag(int cmdNr); + void print(); + void print (int i,int lWithHelp); + + int getCommandCounter(); + void join(CommandTable* table); // join two tables (no deep join!) + + private: + CommandDescription* getCommandDescription(int i); + int getPos(int commandNr); +}; + + +#endif + + + |