Next: Virtual member functions
Up: Command
Previous: Internal data structures
- void check_and_create_text(void) - when called, this
routine will create the text equivalent of the command, if necessary
(that is, when the command HAS a text equiv and the string has not
yet been created). This will be
done by calling the virtual function create_text().
- int execute(void) - execute the command; this will call
the virtual function do_execute(), and return whether the action
was successful.
- int has_text(void) - return whether or not the command
has a text equivalent (if not, the text equivalent is an empty string).
- char *text(void) - return the text equivalent. This will
call the routines to create the string if necessary.
- Cmdtype gettype(void) - return the type code for this object.
- int getUIid(void) - return the ID number of the UIObject
which created this Command instance.
- friend ostream& operator<< - an overload of the << operator
to allow a Command to be easily printed to an ostream.
- friend Inform& operator<< - the same, to send the
text equivalent of the Command to an inform object. For example:
Command *cmd = new CmdAck(); msgInfo << *cmd;
Justin Gullingsrud
Tue Apr 6 09:26:48 CDT 1999