VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
DtRwProperty< _RwType > Class Template Reference

template<typename _RwType>
class DtRwProperty< _RwType >

Templated class that allows for the definition of a property. Only templates of this type can be added into the DtRwProperties class.

Inheritance diagram for DtRwProperty< _RwType >:
Inheritance graph
[legend]

Public Member Functions

 DtRwProperty (const DtString &name, DtReaderWriterRegistry *parentRegistry=0)
 
 DtRwProperty (const DtString &name, const DtRwProperty &orig, DtReaderWriterRegistry *parentRegistry=0)
 
DtRwPropertyoperator= (const DtRwProperty &orig)
 
virtual ~DtRwProperty ()
 
virtual void copy (const DtPropertyInterface &rhs)
 
virtual DtString stringRep (const DtString &root="") const
 
virtual const charpropertyType () const
 
virtual DtSymbolString propertyName () const
 
virtual void setPropertyName (const DtString &propertyName)
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=DtReaderWriter::SearchPaths(), const DtVariableBindingsList &variableBindings=DtReaderWriter::nullVariableReference())
 
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
 
virtual bool merge (const DtPropertyInterface &target, MergeFlags, const DtMergePath &path=DtMergePath(), const std::set< DtString > &ignore=std::set< DtString >())
 
virtual void recordUpdateTime () const
 
virtual bool wasUpdatedSince (DtTime t) const
 
virtual void reset ()
 
Network encoding and decoding
virtual charencode (char *) const
 
virtual const chardecode (const char *)
 
virtual void getSize (int &size) const
 
virtual int hlaAlignment () const
 
virtual DtReaderWriterreaderWriter ()
 
virtual const DtReaderWriterreaderWriter () const
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual bool isPublished () const
 
virtual void setIsPublished (bool isPub)
 
virtual unsigned disRecordType () const
 
virtual void setDisRecordType (unsigned recType)
 
virtual bool isDebugEnabled () const
 
virtual void setDebugEnabled (bool en)
 
- Public Member Functions inherited from DtPropertyInterface
virtual ~DtPropertyInterface ()
 
virtual bool isSimilarProperty (const DtPropertyInterface *rhs, bool strict=true) const
 
virtual bool isPublishedArg (DtlObjPtr arg, unsigned &disVarRecType) const
 
template<typename ValueType >
boost::optional< ValueType > propertyValue () const
 
template<typename ValueType >
bool setPropertyValue (ValueType val)
 
virtual const DtPropertyInterfacefindPropertyInterface (const DtString &propertyName) const
 
virtual DtPropertyInterfacefindPropertyInterface (const DtString &propertyName)
 
template<typename SpecificPropType >
const SpecificPropType * findProperty (const DtString &propertyName) const
 
template<typename SpecificPropType >
SpecificPropType * findProperty (const DtString &propertyName)
 
template<typename ValueType >
boost::optional< ValueType > findPropertyValue (const DtString &propertyName) const
 
template<typename ValueType >
bool findAndSetPropertyValue (const DtString &propertyName, ValueType val)
 
virtual bool addProperty (DtPropertyInterface *property)
 
template<typename SpecificPropType >
SpecificPropType * addNewProperty (const DtString &propertyName)
 
virtual bool removeProperty (const DtString &propertyName)
 
virtual bool removeProperty (const DtPropertyInterface *property)
 
int getSize () const
 

Protected Attributes

DtClock myClock
 
DtTime myUpdateTime
 
unsigned myDisRecordType
 
bool myIsPublished
 
bool myDebugEnabled
 

Private Member Functions

 DtRwProperty ()
 

Additional Inherited Members

- Public Types inherited from DtPropertyInterface
enum  MergeFlags {
  Replace = 0x00000001, MinimalSimilarityCheck = 0x00000002, RollUp = 0x00000004, AddMissing = 0x00000008,
  KeepIsPublished = 0x00000010
}
 

Constructor & Destructor Documentation

template<typename _RwType>
DtRwProperty< _RwType >::DtRwProperty ( )
private

Not implemented.

template<typename _RwType>
DtRwProperty< _RwType >::DtRwProperty ( const DtString name,
DtReaderWriterRegistry parentRegistry = 0 
)
template<typename _RwType>
DtRwProperty< _RwType >::DtRwProperty ( const DtString name,
const DtRwProperty< _RwType > &  orig,
DtReaderWriterRegistry parentRegistry = 0 
)
template<typename _RwType>
virtual DtRwProperty< _RwType >::~DtRwProperty ( )
virtual

Member Function Documentation

template<typename _RwType>
DtRwProperty& DtRwProperty< _RwType >::operator= ( const DtRwProperty< _RwType > &  orig)
template<typename _RwType>
virtual void DtRwProperty< _RwType >::copy ( const DtPropertyInterface rhs)
virtual

Copies the given property into the current one as long as the types are the same.

Implements DtPropertyInterface.

template<typename _RwType>
virtual char* DtRwProperty< _RwType >::encode ( char ) const
virtual
template<typename _RwType>
virtual const char* DtRwProperty< _RwType >::decode ( const char )
virtual

Decodes the property from the specified buffer. Assumes buffer is the start of the property and preceding padding has been skipped.

Implements DtPropertyInterface.

Reimplemented in DtRwPropertySizedString.

template<typename _RwType>
virtual void DtRwProperty< _RwType >::getSize ( int size) const
virtual

Adds the network size of this item in bytes. This does not include any upfront padding for alignment.

Implements DtPropertyInterface.

Reimplemented in DtRwPropertySizedString.

template<typename _RwType>
virtual int DtRwProperty< _RwType >::hlaAlignment ( ) const
virtual

Returns alignment necessary to encode this item in HLA.

Implements DtPropertyInterface.

Reimplemented in DtRwPropertySizedString.

template<typename _RwType>
virtual DtString DtRwProperty< _RwType >::stringRep ( const DtString root = "") const
virtual

Implements DtPropertyInterface.

template<typename _RwType>
virtual const char* DtRwProperty< _RwType >::propertyType ( ) const
virtual

Typically returns reader/writer type.

Implements DtPropertyInterface.

Reimplemented in DtRwPropertiesRangeItem.

template<typename _RwType>
virtual DtSymbolString DtRwProperty< _RwType >::propertyName ( ) const
inlinevirtual

The name of this property.

Implements DtPropertyInterface.

template<typename _RwType>
virtual void DtRwProperty< _RwType >::setPropertyName ( const DtString propertyName)
inlinevirtual

Sets name of this property. Should generally only be called when initially created.

Implements DtPropertyInterface.

template<typename _RwType>
virtual void DtRwProperty< _RwType >::getSelf ( DtlObjPtr  args,
const DtReaderWriter::SearchPaths searchPaths = DtReaderWriter::SearchPaths(),
const DtVariableBindingsList variableBindings = DtReaderWriter::nullVariableReference() 
)
virtual
template<typename _RwType>
virtual DtlObjPtr DtRwProperty< _RwType >::getData ( DtlObjPtr  args,
const DtReaderWriter::SearchPaths searchPaths,
const DtVariableBindingsList variableBindings 
)
virtual

Override to allow a variable to be assigned to a property of derived type.

Implements DtPropertyInterface.

template<typename _RwType>
virtual bool DtRwProperty< _RwType >::merge ( const DtPropertyInterface target,
MergeFlags  ,
const DtMergePath path = DtMergePath(),
const std::set< DtString > &  ignore = std::set< DtString >() 
)
virtual

In this case replace does not matter – will replace value regardless.

Implements DtPropertyInterface.

template<typename _RwType>
virtual DtReaderWriter* DtRwProperty< _RwType >::readerWriter ( )
virtual

Returns a ReaderWriter pointer of the property.

Implements DtPropertyInterface.

template<typename _RwType>
virtual const DtReaderWriter* DtRwProperty< _RwType >::readerWriter ( ) const
virtual

Returns a ReaderWriter pointer of the property.

Implements DtPropertyInterface.

template<typename _RwType>
virtual DtPropertyInterface* DtRwProperty< _RwType >::property ( )
virtual

Returns a PropertyInterface pointer of the ReaderWriter.

template<typename _RwType>
virtual const DtPropertyInterface* DtRwProperty< _RwType >::property ( ) const
virtual

Returns a PropertyInterface pointer of the ReaderWriter.

template<typename _RwType>
virtual void DtRwProperty< _RwType >::recordUpdateTime ( ) const
virtual

Stamps the time when updated.

template<typename _RwType>
virtual bool DtRwProperty< _RwType >::wasUpdatedSince ( DtTime  t) const
virtual
template<typename _RwType>
virtual bool DtRwProperty< _RwType >::isPublished ( ) const
virtual

Whether this property should be published.

Implements DtPropertyInterface.

template<typename _RwType>
virtual void DtRwProperty< _RwType >::setIsPublished ( bool  isPub)
virtual

Whether this property should be published.

Implements DtPropertyInterface.

template<typename _RwType>
virtual unsigned DtRwProperty< _RwType >::disRecordType ( ) const
virtual

If this property is published, which DIS record type should it use. Default is 0, which indicates that the normal VRF generic attribute record type should be used.

Implements DtPropertyInterface.

template<typename _RwType>
virtual void DtRwProperty< _RwType >::setDisRecordType ( unsigned  recType)
virtual

If this property is published, which DIS record type should it use. Default is 0, which indicates that the normal VRF generic attribute record type should be used.

Implements DtPropertyInterface.

template<typename _RwType>
virtual bool DtRwProperty< _RwType >::isDebugEnabled ( ) const
virtual

Enables debug output. Generally this should be left off.

Implements DtPropertyInterface.

template<typename _RwType>
virtual void DtRwProperty< _RwType >::setDebugEnabled ( bool  en)
virtual

Enables debug output. Generally this should be left off.

Implements DtPropertyInterface.

template<typename _RwType>
virtual void DtRwProperty< _RwType >::reset ( )
virtual

Override to clear out variable value.

Implements DtPropertyInterface.

Member Data Documentation

template<typename _RwType>
DtClock DtRwProperty< _RwType >::myClock
protected
template<typename _RwType>
DtTime DtRwProperty< _RwType >::myUpdateTime
mutableprotected
template<typename _RwType>
unsigned DtRwProperty< _RwType >::myDisRecordType
protected
template<typename _RwType>
bool DtRwProperty< _RwType >::myIsPublished
protected
template<typename _RwType>
bool DtRwProperty< _RwType >::myDebugEnabled
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)