VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
DtSimReport Class Reference

DtSimReport is an abstract base class from which real reports can derive. More...

Inheritance diagram for DtSimReport:
Inheritance graph
[legend]

List of all members.

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 DtSimReportclone (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 DtSimReportcreateReport (int reportType)
 Static functions.
static DtSimReportcreateReport (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 DtSimReportFactoryfactory ()
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 DtSimReportoperator= (const DtSimReport &orig)
 assignment operator; same as copy constructor
virtual char * createNetworkBuffer ()

Protected Attributes

char * myNetRep

Static Protected Attributes

static DtSimReportFactorymyFactory

Detailed Description

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.


Constructor & Destructor Documentation

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


Member Function Documentation

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]
virtual bool DtSimReport::setFromNet ( const char *  contentBuffer,
unsigned  contentSize 
) [pure virtual]
virtual bool DtSimReport::setToNet ( ) [pure virtual]
virtual DtString DtSimReport::stringRep ( ) const [virtual]
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]
Returns:
A pointer to the static DtReaderWriterFactory. This factory can create instances of DtReaderWriter subclasses that have been registered with it.

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]

Member Data Documentation

char* DtSimReport::myNetRep [protected]

The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)