VR-Forces 4.10 Class Documentation
 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

Templated class that allows for the definition of a property. More...

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)
 Copies the given property into the current one as long as the types are the same. More...
 
virtual charencode (char *) const
 These methods are for network encoding/decoding for HLA encoding decoding reasons. More...
 
virtual const chardecode (const char *)
 Decodes the variable bindings from the specified buffer. More...
 
virtual void getSize (int &size) const
 Returns the size of this item, iterating over all types. More...
 
virtual int hlaAlignment () const
 Returns alignment necessary to encode this item in HLA. More...
 
virtual DtString stringRep (const DtString &root="") const
 
virtual const charpropertyType () const
 Typically returns reader/writer type. More...
 
virtual DtSymbolString propertyName () const
 The name of this property. More...
 
virtual void setPropertyName (const DtString &propertyName)
 Sets name of this property. Should generally only be called when initially created. More...
 
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 to allow a variable to be assigned to a property of derived type. More...
 
virtual bool merge (const DtPropertyInterface &target, MergeFlags, const DtMergePath &path=DtMergePath(), const std::set< DtString > &ignore=std::set< DtString >())
 In this case replace does not matter – will replace value regardless. More...
 
virtual void recordUpdateTime () const
 Stamps the time when updated. More...
 
virtual bool wasUpdatedSince (DtTime t) const
 Returns true if an update occurred since the specified time. More...
 
virtual void reset ()
 Override to clear out variable value. More...
 
virtual DtReaderWriterreaderWriter ()
 
virtual const DtReaderWriterreaderWriter () const
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual bool isPublished () const
 Whether this property should be published. More...
 
virtual void setIsPublished (bool isPub)
 
virtual unsigned disRecordType () const
 If this property is published, which DIS record type should it use. More...
 
virtual void setDisRecordType (unsigned recType)
 
virtual bool isDebugEnabled () const
 Enables debug output. More...
 
virtual void setDebugEnabled (bool en)
 
- Public Member Functions inherited from DtPropertyInterface
virtual ~DtPropertyInterface ()
 
int getSize () const
 
virtual bool isSimilarProperty (const DtPropertyInterface *rhs, bool strict=true) const
 Returns true if the readerWriterType is the same. More...
 
virtual bool isPublishedArg (DtlObjPtr arg, unsigned &disVarRecType) const
 Tests whether the argument specified indicates this property should be published. More...
 
template<typename ValueType >
boost::optional< ValueType > propertyValue () const
 
template<typename ValueType >
bool setPropertyValue (ValueType val)
 Sets the value of this property. More...
 
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)
 This is a convenience function that combines the functionality of findProperty and setPropertyValue to immediately set the value of the property with the given name, assuming it can be found within this property and its value can be converted from the specified type. More...
 
virtual bool addProperty (DtPropertyInterface *property)
 
template<typename SpecificPropType >
SpecificPropType * addNewProperty (const DtString &propertyName)
 Adds a new property of the specified type and returns pointer to the new item. More...
 
virtual bool removeProperty (const DtString &propertyName)
 
virtual bool removeProperty (const DtPropertyInterface *property)
 

Protected Attributes

DtClock myClock
 
DtTime myUpdateTime
 
unsigned myDisRecordType
 
bool myIsPublished
 
bool myDebugEnabled
 

Private Member Functions

 DtRwProperty ()
 Not implemented. More...
 

Additional Inherited Members

- Public Types inherited from DtPropertyInterface
enum  MergeFlags {
  Replace = 0x00000001, MinimalSimilarityCheck = 0x00000002, RollUp = 0x00000004, AddMissing = 0x00000008,
  KeepIsPublished = 0x00000010
}
 Determines how two lists of properties will be merged by the merge function. More...
 

Detailed Description

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.

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 variable bindings from the specified buffer.

Implements DtPropertyInterface.

Reimplemented in DtRwPropertySizedString.

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

Returns the size of this item, iterating over all types.

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

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

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

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

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 Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)