VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 }

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 void reset ()=0
 Override to clear out variable value.
virtual DtReaderWriterreaderWriter ()=0
virtual const DtReaderWriterreaderWriter () const =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.

Constructor & Destructor Documentation

virtual DtPropertyInterface::~DtPropertyInterface ( )
inlinevirtual

Member Function Documentation

virtual char* DtPropertyInterface::encode ( char ) const
pure virtual

These methods are for network encoding/decoding for Hla encoding decoding reasons.

Implemented at templated rw level Encodes the variable bindings into the supplied buffer

Implemented in DtRwPropertyWithThreshold< _RwType >, DtRwPropertyWithThreshold< DtRwInt >, DtRwPropertyWithThreshold< DtRwReal >, DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, DtRwProperties, and DtRwPropertiesList.

Referenced by DtLocalExtendedPropertiesNetInterface< DtSimLocalControlObjectNetInterface, DtControlObjectRepository >::encodeProperties().

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

Typically returns reader/writer type.

Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, DtRwProperties, and DtRwPropertiesRangeItem.

Referenced by isSimilarProperty().

virtual DtString DtPropertyInterface::stringRep ( const DtString root = "") const
pure virtual
int DtPropertyInterface::getSize ( ) const
inline
virtual DtReaderWriter* DtPropertyInterface::readerWriter ( )
pure virtual

Returns a ReaderWriter pointer of the property. If property is not a ReaderWriter, this should be overridden to return 0.

Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, and DtRwProperties.

Referenced by DtLocalExtendedPropertiesNetInterface< DtSimLocalControlObjectNetInterface, DtControlObjectRepository >::encodeProperties().

virtual const DtReaderWriter* DtPropertyInterface::readerWriter ( ) const
pure virtual

Returns a ReaderWriter pointer of the property. If property is not a ReaderWriter, this should be overridden to return 0.

Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, and DtRwProperties.

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< DtRwInt >, DtRwProperty< DtRwReal >, and DtRwProperties.

virtual DtlObjPtr DtPropertyInterface::getData ( DtlObjPtr  args,
const DtReaderWriter::SearchPaths searchPaths,
const DtVariableBindingsList variableBindings 
)
pure virtual

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

Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, DtRwPropertiesList, and DtRwProperties.

virtual void DtPropertyInterface::reset ( )
pure virtual

Override to clear out variable value.

Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, and DtRwProperties.


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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)