![]() |
VR-Forces 4.0.4 Class Documentation
|
DtSimReport is an abstract base class from which real reports can derive. More...

Public Member Functions | |
| virtual | ~DtSimReport () |
| destructor | |
| virtual bool | init () |
| Base class init does nothing, but this will be called by create, in case any other deriving class needs to do virtual allocation. | |
| virtual int | type () const =0 |
| What kind of report am I? Returns a character string representing the kind of report. | |
| virtual DtSimReport * | clone (const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const =0 |
| Make a copy of this report. | |
| virtual void | putData (FILE *fp, int indentLevel=0) |
| putData writes our type, which is provided by the virtual type accessor of the deriving class. | |
| virtual DtlObjPtr | getData (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings) |
| getData is just used to get us past the type in the data stream, since it's not actually stored. | |
| virtual char * | netRep () |
| virtual void | clearNetRep () |
| Clears the stored netRep. | |
| virtual int | netRepSize () const =0 |
| virtual bool | setFromNet (const char *contentBuffer, unsigned contentSize)=0 |
| virtual bool | setToNet ()=0 |
| virtual DtString | stringRep () const |
Static Public Member Functions | |
| static DtSimReport * | createReport (int reportType) |
| Static functions. | |
| static DtSimReport * | createReport (const DtString &reportTypeString) |
| Creates a report based on a string type. | |
| static void | addReportCreatorFcn (const DtString &reportName, int reportType, DtSimReportCreatorFcn fcn) |
| static void | setFactory (DtSimReportFactory *factory) |
| static DtSimReportFactory * | factory () |
| static bool | getReportNameFromReportType (int reportType, DtString &reportName) |
| static bool | getReportTypeFromReportName (const DtString &reportName, int &reportType) |
Protected Member Functions | |
| DtSimReport () | |
| Constructors are protected because no one should instantiate the base class, just derived versions. | |
| DtSimReport (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=0) | |
| constructor if you have a task 'put' itself, the write name will preface the task. | |
| DtSimReport (const DtString &writeName, const DtSimReport &orig, DtReaderWriterRegistry *parentRegistry=0) | |
| copy constructor | |
| const DtSimReport & | operator= (const DtSimReport &orig) |
| assignment operator; same as copy constructor | |
| virtual char * | createNetworkBuffer () |
Protected Attributes | |
| char * | myNetRep |
Static Protected Attributes | |
| static DtSimReportFactory * | myFactory |
DtSimReport is an abstract base class from which real reports can derive.
It manages the read/write capability; derived classes need only use and register read/writatble data types for derived information. The DtReportMessage class is used to convey a DtSimReport over the radio network. Components register callback functions for report messages in the same way that they do for task and set data messages.
| DtSimReport::DtSimReport | ( | ) | [protected] |
Constructors are protected because no one should instantiate the base class, just derived versions.
default constructor
| DtSimReport::DtSimReport | ( | const DtString & | writeName, |
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | [protected] |
constructor if you have a task 'put' itself, the write name will preface the task.
| DtSimReport::DtSimReport | ( | const DtString & | writeName, |
| const DtSimReport & | orig, | ||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | [protected] |
copy constructor
| virtual DtSimReport::~DtSimReport | ( | ) | [virtual] |
destructor
| const DtSimReport& DtSimReport::operator= | ( | const DtSimReport & | orig | ) | [protected] |
assignment operator; same as copy constructor
| virtual bool DtSimReport::init | ( | ) | [virtual] |
Base class init does nothing, but this will be called by create, in case any other deriving class needs to do virtual allocation.
| virtual int DtSimReport::type | ( | ) | const [pure virtual] |
What kind of report am I? Returns a character string representing the kind of report.
Derived classes must implement this function, returning a string that uniquely represents the kind of report it is. The definitions for report types used in VR-Forces are in radioMsgTypes.h.
Implemented in DtTaskCompleteReport, DtSpotReport, and DtTextReport.
| virtual DtSimReport* DtSimReport::clone | ( | const DtString & | name, |
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | const [pure virtual] |
Make a copy of this report.
Returns a pointer to a newly created copy of this report. Derived classes must implement this function to instantiate and initialize a copy of the derived class type.
Implemented in DtTaskCompleteReport, DtSpotReport, and DtTextReport.
| virtual void DtSimReport::putData | ( | FILE * | fp, |
| int | indentLevel = 0 |
||
| ) | [virtual] |
putData writes our type, which is provided by the virtual type accessor of the deriving class.
Reimplemented from DtReaderWriter.
| virtual DtlObjPtr DtSimReport::getData | ( | DtlObjPtr | args, |
| const DtFilename & | searchPath, | ||
| const DtVariableBindingsList & | variableBindings | ||
| ) | [virtual] |
getData is just used to get us past the type in the data stream, since it's not actually stored.
| virtual char* DtSimReport::netRep | ( | ) | [virtual] |
| virtual void DtSimReport::clearNetRep | ( | ) | [virtual] |
Clears the stored netRep.
It will be regenerated the next time netRep() is called. If a report already has a netRep, and some of the data has changed, call this to force a update of the netRep next time the report is sent on the network.
| virtual int DtSimReport::netRepSize | ( | ) | const [pure virtual] |
Implemented in DtSpotReport, DtTaskCompleteReport, and DtTextReport.
| virtual bool DtSimReport::setFromNet | ( | const char * | contentBuffer, |
| unsigned | contentSize | ||
| ) | [pure virtual] |
Implemented in DtSpotReport, DtTaskCompleteReport, and DtTextReport.
| virtual bool DtSimReport::setToNet | ( | ) | [pure virtual] |
Implemented in DtSpotReport, DtTaskCompleteReport, and DtTextReport.
| virtual DtString DtSimReport::stringRep | ( | ) | const [virtual] |
Reimplemented in DtSpotReport, DtTaskCompleteReport, and DtTextReport.
| static DtSimReport* DtSimReport::createReport | ( | int | reportType | ) | [static] |
Static functions.
Creates a report based on an integer type.
| static DtSimReport* DtSimReport::createReport | ( | const DtString & | reportTypeString | ) | [static] |
Creates a report based on a string type.
| static void DtSimReport::addReportCreatorFcn | ( | const DtString & | reportName, |
| int | reportType, | ||
| DtSimReportCreatorFcn | fcn | ||
| ) | [static] |
| static void DtSimReport::setFactory | ( | DtSimReportFactory * | factory | ) | [static] |
| static DtSimReportFactory* DtSimReport::factory | ( | ) | [static] |
Reimplemented from DtReaderWriter.
| static bool DtSimReport::getReportNameFromReportType | ( | int | reportType, |
| DtString & | reportName | ||
| ) | [static] |
| static bool DtSimReport::getReportTypeFromReportName | ( | const DtString & | reportName, |
| int & | reportType | ||
| ) | [static] |
| virtual char* DtSimReport::createNetworkBuffer | ( | ) | [protected, virtual] |
char* DtSimReport::myNetRep [protected] |
DtSimReportFactory* DtSimReport::myFactory [static, protected] |