![]() |
VR-Forces Development_Version Class Documentation
|
Interface class used to define minimal interface for a property. More...

Public Types | |
| enum | MergeFlags { Replace = 0x00000001, MinimalSimilarityCheck = 0x00000002, RollUp = 0x00000004 } |
Public Member Functions | |
| virtual | ~DtPropertyInterface () |
| virtual char * | encode (char *) const =0 |
| These methods are for network encoding/decoding for Hla encoding decoding reasons. | |
| virtual const char * | decode (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 char * | propertyType () 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 DtReaderWriter * | readerWriter ()=0 |
| virtual const DtReaderWriter * | readerWriter () const =0 |
Interface class used to define minimal interface for a property.
|
inlinevirtual |
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().
Decodes the variable bindings from the specified buffer.
Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, DtRwProperties, and DtRwPropertiesList.
|
pure virtual |
Returns the size of this item, iterating over all types.
Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, DtRwPropertiesList, and DtRwProperties.
Referenced by DtLocalExtendedPropertiesNetInterface< DtSimLocalControlObjectNetInterface, DtControlObjectRepository >::encodeProperties().
|
pure virtual |
Returns hlaAlignment.
Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, and DtRwProperties.
|
pure virtual |
Typically returns reader/writer type.
Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, DtRwProperties, and DtRwPropertiesRangeItem.
Referenced by isSimilarProperty().
Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, and DtRwProperties.
|
inline |
References DtBufferSerialize::getSize().
|
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().
|
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.
|
inlinevirtual |
Returns true if the readerWriterType is the same.
Subclasses can do extra checking
Reimplemented in DtRwPropertiesList, DtRwPropertiesMap, and DtRwPropertiesStructure.
References propertyType().
|
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.
|
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.
|
pure virtual |
Override to clear out variable value.
Implemented in DtRwProperty< _RwType >, DtRwProperty< DtRwInt >, DtRwProperty< DtRwReal >, and DtRwProperties.