In file NsgCmd.hxx:

class NsgCmd

Abstract base command class with a token string and empty methods for extracting parameters from a string and putting values into a string

Inheritance:


Public Methods

NsgCmd ( string tok, NsgInterface* cmdInterface )
Constructor which sets its command identifier string and the command Interface and the registers itself with the NsgCmdRegistry
virtual ~NsgCmd ()
destructor
virtual int parseStream ( const char *cmdString)
Parses the given string depending on its command type and internally stores the params
virtual void execute ()
Executes the command, invoking the related functions is NsgInterface
virtual void toStream ( ostrstream& obuf )
Serialises this command by putting the name and data into the given stream
inline string getToken ()
returns the identifier string for this command

Documentation

Abstract base command class with a token string and empty methods for extracting parameters from a string and putting values into a string. On creation, each NsgCmd registers itself with the NsgCmdRegistry with its identifier. When any new commands are received from the dbclient, the NsgCmdInterpreter will disseminate it to the appropriate NsgCmd calling its execute method. This also has an instance of the NsgInterface whose commands will be called by the inherited NsgCmd's.
NsgCmd( string tok, NsgInterface* cmdInterface )
Constructor which sets its command identifier string and the command Interface and the registers itself with the NsgCmdRegistry. Depending on the command string the appropriate functions in the NsgInterface will be called

virtual int parseStream( const char *cmdString)
Parses the given string depending on its command type and internally stores the params. Returns false if command doesnt match This is called by the NsgCmdInterpreter before calling execute. Should be overriden by inheriting classes.
Parameters:
cmdString - string that has the command token and its associated data.

virtual void execute()
Executes the command, invoking the related functions is NsgInterface. Should be overriden by inheriting classes

virtual void toStream( ostrstream& obuf )
Serialises this command by putting the name and data into the given stream
Parameters:
obuf - output string stream


Direct child classes:
NsgTransformCmd
NsgCAVENavCmd
Author:
Chris Scharver, Shalini Venkataraman

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de