VR-Forces 4.5 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, AddMissing = 0x00000008 }

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.

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

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< DtRwReal >, DtRwProperty< DtRwVector >, DtRwProperty< DtRwBoolean >, DtRwProperty< DtRwOffsetVector >, and DtRwProperties.

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

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)