VR-Forces 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 () override
 
virtual void copy (const DtPropertyInterface &rhs) override
 
virtual DtString stringRep (const DtString &root="") const override
 
virtual const charpropertyType () const override
 
virtual DtSymbolString propertyName () const override
 
virtual void setPropertyName (const DtString &propertyName) override
 
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) override
 
virtual bool merge (const DtPropertyInterface &target, MergeFlags, const DtMergePath &path=DtMergePath(), const std::set< DtString > &ignore=std::set< DtString >()) override
 
virtual void recordUpdateTime () const
 
virtual bool isUpdateNeeded (DtTime t) const override
 
virtual bool hasReceivedUpdateSince (DtTime t) const override
 
virtual DtTime updateClockTime () const override
 
virtual void reset () override
 
virtual void setKeepPublishingSettings (bool keep) override
 
virtual bool keepPublishingSettings () const override
 
Network encoding and decoding
virtual charencode (char *) const override
 
virtual const chardecode (const char *) override
 
virtual void getSize (int &size) const override
 
virtual int hlaAlignment () const override
 
virtual DtReaderWriterreaderWriter () override
 
virtual const DtReaderWriterreaderWriter () const override
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual bool isPublished () const override
 
virtual void setIsPublished (bool isPub) override
 
virtual unsigned disRecordType () const override
 
virtual void setDisRecordType (unsigned recType) override
 
virtual bool isDebugEnabled () const override
 
virtual void setDebugEnabled (bool en) override
 
- Public Member Functions inherited from DtPropertyInterface
virtual ~DtPropertyInterface ()
 
virtual bool isSimilarProperty (const DtPropertyInterface *rhs, bool strict=true) const
 
virtual void writePublishInformation (std::string &fp, int indentLevel)
 
virtual bool isPublishedArg (DtlObjPtr arg, unsigned &disVarRecType)
 
virtual void copyPublishingSettings (const DtPropertyInterface &prop)
 
virtual void processPublicationArgs (DtlObjPtr arg)
 
virtual void processPublicationArg (DtlObjPtr arg)
 
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 myKeepPublishingSettingsOnCopy
 
bool myDebugEnabled
 

Private Member Functions

 DtRwProperty ()
 

Additional Inherited Members

- Public Types inherited from DtPropertyInterface
enum  MergeFlags {
  Replace = 0x00000001, MinimalSimilarityCheck = 0x00000002, RollUp = 0x00000004, AddMissing = 0x00000008,
  KeepPublishedSettings = 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 ( )
overridevirtual

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)
overridevirtual

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
overridevirtual
template<typename _RwType>
virtual const char* DtRwProperty< _RwType >::decode ( const char )
overridevirtual

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
overridevirtual

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
overridevirtual

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
overridevirtual

Implements DtPropertyInterface.

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

Typically returns reader/writer type.

Implements DtPropertyInterface.

Reimplemented in DtRwPropertiesRangeItem.

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

The name of this property.

Implements DtPropertyInterface.

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

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 
)
overridevirtual

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 >() 
)
overridevirtual
template<typename _RwType>
virtual DtReaderWriter* DtRwProperty< _RwType >::readerWriter ( )
overridevirtual

Returns a ReaderWriter pointer of the property.

Implements DtPropertyInterface.

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

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 >::isUpdateNeeded ( DtTime  t) const
overridevirtual
template<typename _RwType>
virtual bool DtRwProperty< _RwType >::hasReceivedUpdateSince ( DtTime  t) const
overridevirtual

Returns true if an update was received remotely since the specified time.

Implements DtPropertyInterface.

template<typename _RwType>
virtual DtTime DtRwProperty< _RwType >::updateClockTime ( ) const
overridevirtual

Returns the current time on the update clock. Can be used to pass into a future call to hasReceivedUpdateSince(t) to see if an update has been processed in the meantime.

Implements DtPropertyInterface.

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

Whether this property should be published.

Implements DtPropertyInterface.

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

Whether this property should be published.

Implements DtPropertyInterface.

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

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)
overridevirtual

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
overridevirtual

Enables debug output. Generally this should be left off.

Implements DtPropertyInterface.

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

Enables debug output. Generally this should be left off.

Implements DtPropertyInterface.

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

Override to clear out variable value.

Implements DtPropertyInterface.

template<typename _RwType>
virtual void DtRwProperty< _RwType >::setKeepPublishingSettings ( bool  keep)
overridevirtual

Specifies whether the publishing settings for this property should be retained when it is updated from another property.

Implements DtPropertyInterface.

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

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 >::myKeepPublishingSettingsOnCopy
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 Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)