Interpret.h

musicmud-2.1.6/include/Interpret.h · 581 B

From the archive musicmud2.1.6.tar.gz

Download the archive   « Back to the archive contents

#ifndef INTERPRET_H
#define INTERPRET_H

//! a command handler
class Interpreter : public Object {
 public:
  //! create an interpreter with given id
	Interpreter(const char *id) : Object(id) {
	}

  //! invoke the interpreter on /who/, with string /what/, which has been space-seperated into /argc/ and /argv/
	virtual int invoke(MudObject *who, const char *what, int argc, const char **argv) = 0;
	/*   1  == success,        0  == success, and don't log
	 *  -1  == failure
	 */
};

//! all the interpreters that have been loaded
extern World<Interpreter> *interpreters;

#endif

Site Stats

Snippets: 1791
Codebases: 571