commandTable.h
scratch/src/commandTable.h · 1.2 KB
From the archive scratch.tgz
Download the archive « Back to the archive contents
///////////////////////////////////////////////////////////
///////////////// Have an itch? Scratch it! ///////////////
///////////////////////// SCRATCH /////////////////////////
///////////////////// A MUD Server ////////////////////
///////////////////// By: Jared Devall ////////////////////
///////////////////// Thanks: ////////////////////
///////////////////// DIKU/Merc/ROM ////////////////////
///////////////////// Aetas/Deus Gang ////////////////////
///////////////////// Beej ////////////////////
///////////////////////////////////////////////////////////
#ifndef __COMMANDTABLE_H_
#define __COMMANDTABLE_H_
#include <list>
#include "avatar.h"
#include "commands.h"
// The Command Table
class CommandTable {
public:
std::list< Command * > _commands;
CommandTable();
bool Execute( Avatar *, const std::string & );
bool LoadCommands( void );
bool LoadDisabledCommands( void );
Command * FindCommand( Avatar *, const std::string &, bool shortcut );
static CommandTable &Instance();
};
// Our singleton instance
inline CommandTable &CommandTable::Instance() {
static CommandTable instance;
return instance;
}
#endif // __commandtable_h