VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
DtPropertyInterface Class Reference

Interface class used to define minimal interface for a property. More...

Inheritance diagram for DtPropertyInterface:
Inheritance graph
[legend]

Public Types

enum  MergeFlags {
  Replace = 0x00000001, MinimalSimilarityCheck = 0x00000002, RollUp = 0x00000004, AddMissing = 0x00000008,
  KeepIsPublished = 0x00000010
}

Public Member Functions

virtual ~DtPropertyInterface ()
virtual charencode (char *) const =0
 These methods are for network encoding/decoding for Hla encoding decoding reasons.
virtual const chardecode (const char *)=0
 Decodes the variable bindings from the specified buffer.
virtual void getSize (int &size) const =0
 Returns the size of this item, iterating over all types.
virtual int hlaAlignment () const =0
 Returns hlaAlignment.
virtual const charpropertyType () const =0
 Typically returns reader/writer type.
virtual DtString stringRep (const DtString &root="") const =0
int getSize () const
virtual bool isSimilarProperty (const DtPropertyInterface *rhs) const
 Returns true if the readerWriterType is the same.
virtual bool merge (const DtPropertyInterface &target, MergeFlags, const DtMergePath &path=DtMergePath(), const std::set< DtString > &ignore=std::set< DtString >())=0
 Takes the contents of the supplied properties and merges with the following rules if replace is false: 1) If the same named property of the same type (and prototype and key) exists regardless of what the contents are in this property, it is replaced with the contents of the target 2) If a property in the target does not exist in source, it is not merged in 3) All other items are kept in the source.
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)=0
 Override to allow a variable to be assigned to a property of derived type.
virtual bool isPublishedArg (DtlObjPtr arg, unsigned &disVarRecType) const
 Tests whether the argument specified indicates this property should be published.
virtual void reset ()=0
 Override to clear out variable value.
virtual DtReaderWriterreaderWriter ()=0
virtual const DtReaderWriterreaderWriter () const =0
virtual bool isPublished () const =0
 Whether this property should be published.
virtual void setIsPublished (bool isPub)=0
virtual unsigned disRecordType () const =0
 If this property is published, which DIS record type should it use.
virtual void setDisRecordType (unsigned recType)=0

Detailed Description

Interface class used to define minimal interface for a property.

Member Enumeration Documentation

Enumerator:
Replace 
MinimalSimilarityCheck 

Replace contents wholesale.

RollUp 

Do not do a stringent compare on items – allows for partial item replacement.

AddMissing 

This will add up numerical items and keep string items if the values are similar, else it will remove.

Any item that exists in the to be merged that does not exist in the source will be added as long as the structures are similar, else they will be ignored

KeepIsPublished 

Any items missing will be added to the target.

Constructor & Destructor Documentation

virtual DtPropertyInterface::~DtPropertyInterface ( )
inlinevirtual

Member Function Documentation

virtual char* DtPropertyInterface::encode ( char ) const
pure virtual
virtual const char* DtPropertyInterface::decode ( const char )
pure virtual
virtual void DtPropertyInterface::getSize ( int size) const
pure virtual
virtual int DtPropertyInterface::hlaAlignment ( ) const
pure virtual
virtual const char* DtPropertyInterface::propertyType ( ) const
pure virtual
virtual DtString DtPropertyInterface::stringRep ( const DtString root = "") const
pure virtual
int DtPropertyInterface::getSize ( ) const
inline
virtual DtReaderWriter* DtPropertyInterface::readerWriter ( )
pure virtual
virtual const DtReaderWriter* DtPropertyInterface::readerWriter ( ) const
pure virtual
virtual bool DtPropertyInterface::isSimilarProperty ( const DtPropertyInterface rhs) const
inlinevirtual

Returns true if the readerWriterType is the same.

Subclasses can do extra checking

Reimplemented in DtRwPropertiesList, DtRwPropertiesMap, and DtRwPropertiesStructure.

References propertyType().

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

Takes the contents of the supplied properties and merges with the following rules if replace is false: 1) If the same named property of the same type (and prototype and key) exists regardless of what the contents are in this property, it is replaced with the contents of the target 2) If a property in the target does not exist in source, it is not merged in 3) All other items are kept in the source.

If replace is true, any matching items are replaced by their target. This will add/remove properties

This is a non-recursive function. It only looks at top level property items.

Returns true if merge was successful

Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwString >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwInt8 >, DtRwProperty< DtRwInt16 >, DtRwProperty< DtRwReal >, DtRwProperty< DtRwVector >, DtRwProperty< DtRwReal64 >, DtRwProperty< DtRwBoolean >, DtRwProperty< DtRwOffsetVector >, DtRwProperty< DtRwInt32 >, DtRwProperty< DtRwReal32 >, and DtRwProperties.

virtual DtlObjPtr DtPropertyInterface::getData ( DtlObjPtr  args,
const DtReaderWriter::SearchPaths searchPaths,
const DtVariableBindingsList variableBindings 
)
pure virtual
virtual bool DtPropertyInterface::isPublishedArg ( DtlObjPtr  arg,
unsigned disVarRecType 
) const
inlinevirtual

Tests whether the argument specified indicates this property should be published.

If a specific DIS variable record type is indicated, this is returned in disVarRecType.

virtual bool DtPropertyInterface::isPublished ( ) const
pure virtual
virtual void DtPropertyInterface::setIsPublished ( bool  isPub)
pure virtual
virtual unsigned DtPropertyInterface::disRecordType ( ) const
pure virtual
virtual void DtPropertyInterface::setDisRecordType ( unsigned  recType)
pure virtual
virtual void DtPropertyInterface::reset ( )
pure virtual

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)