19 #include <vlutil/vlTime.h>
25 template <
typename _RwType>
48 virtual char *
encode(
char *)
const override;
52 virtual const char *
decode(
const char *)
override;
73 virtual void getSelf(DtlObjPtr args,
83 const std::set<DtString> &ignore = std::set<DtString>())
override;
131 virtual void reset()
override;
159 template <
typename _RwType>
178 virtual char *
encode(
char *)
const override;
245 const std::set<DtString> &ignore = std::set<DtString>())
override;
302 virtual char *
encode(
char *)
const override;
306 virtual const char *
decode(
const char *)
override;
310 virtual void getSize(
int &size)
const override;
319 virtual const char *
xmlType()
const override {
324 #define rwProperties_INL_
325 #include <readerWriter/rwProperty.inl>
326 #undef rwProperties_INL_
virtual bool hasReceivedUpdateSince(DtTime t) const override
Returns true if an update was received remotely since the specified time.
virtual const char * xmlType() const override
Routines to archive/dearchive from an XML Environment.
Definition: rwProperty.h:319
virtual void writePublishInformation(std::string &fp, int indentLevel) override
Writes threshold specific information.
double myThreshold
Definition: rwProperty.h:262
#define DT_DLL_readerWriter
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: readerWriterDefines.h:34
virtual const char * readerWriterType() const override
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
virtual void setPropertyName(const DtString &propertyName) override
Sets name of this property. Should generally only be called when initially created.
Definition: rwProperty.h:71
virtual const char * propertyType() const override
Typically returns reader/writer type.
static const char * theXmlType()
The type that is used when archiving to an XML stream.
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
virtual bool merge(const DtPropertyInterface &target, MergeFlags, const DtMergePath &path=DtMergePath(), const std::set< DtString > &ignore=std::set< DtString >()) override
In this case replace does not matter – will replace value regardless.
virtual DtPropertyInterface * property()
Returns a PropertyInterface pointer of the ReaderWriter.
virtual const char * decode(const char *) override
Decodes the property from the specified buffer. Assumes buffer is the start of the property and prece...
unsigned myDisRecordType
Definition: rwProperty.h:141
virtual DtString stringRep(const DtString &root="") const override
This class is similar to DtRwProperty, but allows you to specify a threshold at which the value shoul...
Definition: rwProperty.h:160
virtual void setDisRecordType(unsigned recType) override
If this property is published, which DIS record type should it use. Default is 0, which indicates tha...
virtual DtThresholdAlgorithm thresholdAlgorithm() const
virtual DtTime maxUnchangedUpdateInterval() const
Definition: rwProperty.h:328
static DtThresholdAlgorithm myDefaultThresholdAlgorithm
Definition: rwProperty.h:258
virtual bool keepPublishingSettings() const override
Definition: rwProperty.h:432
DtThresholdAlgorithm
Definition: rwProperty.h:148
virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
Override to allow a variable to be assigned to a property of derived type.
virtual double amountChanged() const
Returns the amount the value has changed since the last update.
Definition: rwProperty.h:150
voidpf void uLong size
Definition: ioapi.h:39
Definition: readerWriter.h:85
virtual void setMaxUpdateInterval(DtTime interval)
Changes the maximum time between updates if data has changed but has not crossed the threshold for an...
static void setDefaultMaxUnchangedUpdateInterval(DtTime interval)
Changes the default max unchanged update interval for cases when setMaxUnchangedUpdateInterval() has ...
virtual void copy(const DtPropertyInterface &rhs) override
Copies the given property into the current one as long as the types are the same. ...
virtual void setDebugEnabled(bool en) override
Enables debug output. Generally this should be left off.
virtual bool isPublished() const override
Whether this property should be published.
Definition: readerWriterRegistry.h:39
virtual void setIsPublished(bool isPub) override
Whether this property should be published.
Definition: rwProperty.h:402
Definition: rwProperty.h:271
Interface class used to define minimal interface for a property. The DtPropertyInterface class provid...
Definition: propertyInterface.h:53
virtual void copyPublishingSettings(const DtPropertyInterface &prop) override
Copies the publishing settings from another property to use for this one.
virtual ~DtRwPropertyWithThreshold() override
virtual bool isUpdateNeeded(DtTime t) const override
Returns true if the value has been updated since the specified time and needs to be sent on the netwo...
Definition: rwProperty.h:372
DtTime myUpdateTime
Definition: rwProperty.h:140
virtual void reset() override
Override to clear out variable value.
DtRwPropertyWithThreshold()
Not implemented.
virtual void setDefaultThresholdAlgorithm(DtThresholdAlgorithm alg)
Sets the default threshold algorithm to use for cases when setThresholdAlgorithm() has not been set...
static double myDefaultThreshold
Definition: rwProperty.h:261
DtTime myMaxUnchangedUpdateInterval
Definition: rwProperty.h:268
Definition: rwProperty.h:417
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
virtual void setThreshold(double value)
Sets the threshold for when an update should be sent. If, based on the chosen threshold algorithm...
virtual char * encode(char *) const override
Encodes the property into the supplied buffer. Does not align the property. Buffer must already be al...
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
static DtTime myDefaultMaxUnchangedUpdateInterval
Definition: rwProperty.h:267
int getSize() const
Returns the network size of this item in bytes. This does not include any upfront padding for alignme...
virtual void setThresholdAlgorithm(DtThresholdAlgorithm alg)
Sets the threshold algorithm to use.
Definition: rwProperty.h:152
std::vector< DtMergePathStruct > DtMergePath
Definition: readerWriterFactory.h:181
virtual void setMaxUnchangedUpdateInterval(DtTime interval)
Changes the maximum time between updates if data has changed but has not crossed the threshold for an...
bool myKeepPublishingSettingsOnCopy
Definition: rwProperty.h:143
DtRwPropertyWithThreshold & operator=(const DtRwPropertyWithThreshold &orig)
Definition: rwProperty.h:387
Definition: rwProperty.h:357
Definition: rwProperty.h:287
DtRwProperty()
Not implemented.
_RwType myLastEncodedValue
The value at the last time the value was encoded.
Definition: rwProperty.h:253
Definition: rwProperty.h:462
bool myDebugEnabled
Definition: rwProperty.h:145
static const DtVariableBindingsList & nullVariableReference()
virtual DtReaderWriter * readerWriter() override
Returns a ReaderWriter pointer of the property.
virtual double threshold() const
DtTime myLastEncodeTime
The time the value was last encoded.
Definition: rwProperty.h:256
DtRwProperty & operator=(const DtRwProperty &orig)
virtual int hlaAlignment() const override
Returns alignment necessary to encode this item in HLA.
Defines the DtPropertyInterface class, the interface for all property classes.
virtual double percentChanged() const
Returns the percentage the value has changed since the last update.
virtual char * encode(char *) const override
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. In addition, stores the value in myLastEncodedValue for threshold testing.
DtThresholdAlgorithm myThresholdAlgorithm
Definition: rwProperty.h:259
Definition: rwProperty.h:342
bool myIsPublished
Definition: rwProperty.h:142
Templated class that allows for the definition of a property. Only templates of this type can be adde...
Definition: rwProperty.h:26
virtual bool isDebugEnabled() const override
Enables debug output. Generally this should be left off.
virtual void processPublicationArg(DtlObjPtr arg) override
Processes publication a publication argument specified in the SMS for this property. Overloaded to handle "thresholdPercent", "maxUnchangedInterval", and "maxInterval" arguments.
virtual bool merge(const DtPropertyInterface &target, DtPropertyInterface::MergeFlags, const DtMergePath &path=DtMergePath(), const std::set< DtString > &ignore=std::set< DtString >()) override
In this case replace does not matter – will replace value regardless.
static void setDefaultThreshold(double value)
Changes the default threshold for cases when setThreshold() has not been called.
virtual ~DtRwProperty() override
virtual unsigned disRecordType() const override
If this property is published, which DIS record type should it use. Default is 0, which indicates tha...
Definition: rwProperty.h:151
virtual DtTime maxUpdateInterval() const
virtual DtTime updateClockTime() const override
Returns the current time on the update clock. Can be used to pass into a future call to hasReceivedUp...
virtual bool isSimilarProperty(const DtPropertyInterface *rhs, bool strict=true) const
Returns true if the readerWriterType is the same. Subclasses can do extra checking. If strict is true, some property types will do extra checking and fail if the types do not exactly match. If false, these types will do a basic check, which can be useful when the the types are similar enough to perform a merge.
static DtTime myDefaultMaxUpdateInterval
Definition: rwProperty.h:264
virtual DtSymbolString propertyName() const override
The name of this property.
Definition: rwProperty.h:68
virtual bool isUpdateNeeded(DtTime t) const override
Returns true if the value has been updated since the specified time and needs to be sent on the netwo...
DtTime myMaxUpdateInterval
Definition: rwProperty.h:265
virtual void setKeepPublishingSettings(bool keep) override
Specifies whether the publishing settings for this property should be retained when it is updated fro...
static void setDefaultMaxUpdateInterval(DtTime interval)
Changes the default max update interval for cases when setMaxUpdateInterval() has not been called...
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=DtReaderWriter::SearchPaths(), const DtVariableBindingsList &variableBindings=DtReaderWriter::nullVariableReference())
virtual void recordUpdateTime() const
Stamps the time when updated.
Definition: rwProperty.h:447
MergeFlags
Determines how two lists of properties will be merged by the merge function.
Definition: propertyInterface.h:58