home *** CD-ROM | disk | FTP | other *** search
- #ifndef __CCmd_h__
- #define __CCmd_h__
-
- #include "Console.h"
-
- /*
- This is the mother of all ccmds.
- It is an abstract class witch only defines the interface
- */
- class CCmd{
- public:
- const char* name; /* name of the ccmd */
- const char* infoStr; /* string to be displayed by 'info'-cmd */
- const char* usageStr; /* string to be displayed by 'usage'-cmd */
-
- unsigned short flags; /* accessability flags */
-
- CCmd(const char* name); /* since CCmd is an abstract class, this only sets the name variable */
- virtual ~CCmd()=0; /* make this class abstract, so only the derivates can be used */
-
- virtual bool exec(int argc, char* argv[])=0; /* exec ccmd with arguments */
- void setConsole(Console* con); /* links the ccmd to Console 'con'*/
-
- char* getFlagsStr(char* buff); /* writes a string describing the accessability-flags into buff */
-
- protected:
- Console* console; /* Console to whitch the ccmd is attached */
- };
-
-
-
-
- #endif /* __CCmd_h__ */
-