![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2006 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: mySimCommand.h,v $ $Revision: 1.3 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 //\file consoleMessageCommand.h 00010 //\brief DtConsoleMessageCommand. 00011 00012 #ifndef consoleMessageCommand_h 00013 #define consoleMessageCommand_h 00014 00015 #include "vrfplan/simCommand.h" 00016 #include "vrfutil/rwString.h" 00017 #include <vlutil/vlPrint.h> 00018 #include "vrftasks/radioMsgTypes.h" 00019 00020 const int MySimCommandType = MIN_USER_RADIO_MESSAGE_TYPE + 200; 00021 const char MySimCommandTypeString[] = "my-sim-command"; 00022 00023 //\brief DtSimCommand which causes a console message to be printed. 00024 //This command will simply print a message to the back-end console 00025 00026 class MySimCommand : public DtSimCommand 00027 { 00028 public: 00029 //Default constructor 00030 MySimCommand(); 00031 00032 //Usual constructor 00033 MySimCommand(const DtString& writeName, 00034 DtReaderWriterRegistry* parentRegistry = NULL); 00035 00036 //copy constructor 00037 MySimCommand(const DtString & writeName, const MySimCommand& orig, 00038 DtReaderWriterRegistry* parentRegistry = NULL); 00039 00040 //destructor 00041 virtual ~MySimCommand(); 00042 00043 //assignment operator 00044 MySimCommand& operator=(const MySimCommand& orig); 00045 00046 //\return MySimCommandType. 00047 int type() const; 00048 00049 //\return A new instance of this class, copied from the original. 00050 virtual DtSimCommand * clone(const DtString & name, DtReaderWriterRegistry * 00051 parentRegistry = 0) const; 00052 00053 //Message to print to console 00055 virtual DtString messageText() const; 00056 virtual void setMessageText(const DtString& text); 00058 00059 //Text representation of this command. 00060 virtual DtString stringRep() const; 00061 00062 //\copydoc DtSimCommand::netRepSize() 00063 virtual int netRepSize() const; 00064 00065 //\copydoc DtSimCommand::setFromNet() 00066 virtual bool setFromNet(const char* contentBuffer, 00067 unsigned contentSize); 00068 00069 //\copydoc DtSimCommand::setToNet() 00070 virtual bool setToNet(); 00071 00072 //Returns a new instance of this class. 00073 static DtSimCommand* creator(); 00074 00075 protected: 00076 DtRwString myMessageText; 00077 }; 00078 00079 #endif