home *** CD-ROM | disk | FTP | other *** search
- #include "CCmd.h"
- #include <string.h>
-
- /*
- CCmd is an abstract class, so this constructor is only used to init the fields.
- */
- CCmd::CCmd(const char* name){
- this->name=name;
- infoStr=NULL;
- usageStr=NULL;
- flags=CON_FLAG_ALL_SET;
- }
-
- /*
- We give an implementation for the virtual destructor of CCmd for the compiler
- */
- CCmd::~CCmd(){
- }
-
- /*
- sets the console to whitch the ccmd is attached
- */
- void CCmd::setConsole(Console* con){
- console=con;
- }
-
- /*
- Same as for CVar
- */
- char* CCmd::getFlagsStr(char* buff){
- /*
- buff[0]= (flags & CON_FLAG_SERVER_READ) ? 'r' : '-';
- buff[1]= (flags & CON_FLAG_SERVER_WRITE) ? 'w' : '-';
- buff[2]= (flags & CON_FLAG_SERVER_EXECUTE) ? 'x' : '-';
- buff[3]= '|';
- buff[4]= (flags & CON_FLAG_CLIENT_READ) ? 'r' : '-';
- buff[5]= (flags & CON_FLAG_CLIENT_WRITE) ? 'w' : '-';
- buff[6]= (flags & CON_FLAG_CLIENT_EXECUTE) ? 'x' : '-';
- buff[7]= '\0';
- */
-
- strcpy(buff, "[exe]");
-
- return buff;
- }
-