12 #include <vlutil/vlString.h>
51 template <
typename KeyType>
57 void setRegistryIterator(std::vector<DtReaderWriterRegistryData*>::iterator iter);
59 std::vector<DtReaderWriterRegistryData*>::iterator registryIterator()
const;
64 std::vector<DtReaderWriterRegistryData*>::iterator
myRegIter;
96 template <
typename KeyType>
102 void setRegistryIterator(std::vector<DtReaderWriterRegistryData*>::const_iterator iter);
104 std::vector<DtReaderWriterRegistryData*>::const_iterator registryIterator()
const;
109 std::vector<DtReaderWriterRegistryData*>::const_iterator
myRegIter;
164 virtual unsigned size()
const;
193 virtual void getSelf(DtlObjPtr args,
196 virtual DtlObjPtr
getData(DtlObjPtr args,
212 virtual char*
encode(
char*)
const;
215 virtual const char*
decode(
const char*);
222 static void cleanupPropertyFactory();
240 virtual int count()
const;
263 const std::set<DtString>& ignore = std::set<DtString>());
313 virtual void reset();
322 virtual void invalidateCache();
325 virtual void invalidateCacheForProperty(
const DtString& propName);
345 virtual bool setWritePrototypeHeader(
bool);
346 virtual bool writePrototypeHeader()
const;
353 virtual void filterIgnoredProperties(
DtReaderWriter* rw,
const std::set<DtString>& ignore);
360 virtual void writeSelf(std::string& fp,
int indentLevel,
bool writeUnspecified,
const DtFilename& path);
361 virtual void writeData(std::string& fp,
int indentLevel,
bool writeUnspecified,
const DtFilename& path);
363 virtual void putData(std::string&,
int indentLevel = 0);
381 virtual void writePrototypeHeader(std::string& fp,
const DtReaderWriter* rw,
int indentLevel)
const;
384 virtual void writePropertyData(
DtReaderWriter* rw, std::string& fp,
int indentLevel,
bool writeUnspecified,
const DtFilename& path);
388 virtual void getSortedProperties(
const DtRwVariableBindings& varBindings, std::vector<const DtReaderWriter*>& propertyList)
const;
389 virtual void getSortedProperties(
DtRwVariableBindings& varBindings, std::vector<DtReaderWriter*>& propertyList);
426 template <
typename KeyType>
430 <<
"\", to the specified type." << std::endl;
436 inline int DtPropertiesIterator::key<int>()
const
439 DtString keyStr(property()->propertyName().
string());
440 int result = keyStr.toInt(&ok);
444 DtWarn <<
"Could not convert key, \"" << property()->propertyName()
445 <<
"\", to an int." << std::endl;
452 inline double DtPropertiesIterator::key<double>()
const
455 DtString keyStr(property()->propertyName().
string());
456 int result = keyStr.toDouble(&ok);
460 DtWarn <<
"Could not convert key, \"" << property()->propertyName()
461 <<
"\", to an double." << std::endl;
468 inline DtString DtPropertiesIterator::key<DtString>()
const
470 return property()->propertyName().string();
473 template <
typename KeyType>
477 <<
"\", to the specified type." << std::endl;
481 inline int DtPropertiesConstIterator::key<int>()
const
484 DtString keyStr(property()->propertyName().
string());
485 int result = keyStr.toInt(&ok);
489 DtWarn <<
"Could not convert key, \"" << property()->propertyName()
490 <<
"\", to an int." << std::endl;
497 inline double DtPropertiesConstIterator::key<double>()
const
500 DtString keyStr(property()->propertyName().
string());
501 int result = keyStr.toDouble(&ok);
505 DtWarn <<
"Could not convert key, \"" << property()->propertyName()
506 <<
"\", to an double." << std::endl;
513 inline DtString DtPropertiesConstIterator::key<DtString>()
const
515 return property()->propertyName().string();
DtString myPreviousParentPropFullName
Definition: rwProperties.h:423
virtual void setName(const DtString &)
Set the name of the object.
tbb::spin_mutex * myCacheMutex
Definition: rwProperties.h:402
int mySizeAtLastCheck
Stores the number of items in the last at the last time it was discovered the size changed...
Definition: rwProperties.h:412
#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
Definition: symbolString.h:20
DtPropertiesConstIterator const_iterator
Definition: rwProperties.h:135
virtual DtString stringRep(const DtString &root="") const =0
virtual void unrecognizedItem(const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
Called when the xml reader tries to parse an unknown reader/writer item. Default is a no-op...
virtual void copy(const DtPropertyInterface &rhs)=0
Copies the given property into the current one as long as the types are the same. ...
const DtPropertyInterface * property() const
DtRwVariableBindings & operator=(const DtRwVariableBindings &orig)
std::vector< DtReaderWriterRegistryData * >::iterator myRegIter
Definition: rwProperties.h:64
virtual const char * decode(const char *)=0
Decodes the property from the specified buffer.
DtClock myClock
Definition: rwProperties.h:404
virtual void setIsPublished(bool isPub)=0
DT_DLL_readerWriter DtBoost::shared_ptr< DtEnvironment > DtEnvironmentSP
Definition: readerWriter.h:30
virtual DtSymbolString propertyName() const
The name of this property.
Definition: rwProperties.h:288
virtual bool wasUpdatedSince(DtTime t) const
Can be implemented in subclasses to return true if an update occurred after the specified time...
bool myIsPublished
Definition: rwProperties.h:416
voidpf void uLong size
Definition: ioapi.h:39
virtual void setDebugEnabled(bool en)=0
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
Definition: readerWriter.h:85
virtual void removeVariable(DtReaderWriter *)
bool myWritePrototypeHeader
Definition: rwProperties.h:418
virtual bool isDebugEnabled() const =0
Enables debug output.
Definition: readerWriterRegistry.h:39
std::multimap< DtString, DtReaderWriter * > myRwPropertyCache
Definition: rwProperties.h:401
DtPropertiesIterator iterator
Definition: rwProperties.h:134
virtual bool removeProperty(const DtString &propertyName)
Definition: propertyInterface.h:232
DtTime myLastTimeSizeChanged
Stores the last time at which it was discovered that the size of the list changed.
Definition: rwProperties.h:408
voidpf void * buf
Definition: ioapi.h:39
virtual int hlaAlignment() const =0
Returns alignment necessary to encode this item in HLA.
Iterator for traversing DtRwProperties or its subclasses.
Definition: rwProperties.h:69
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.
Interface class used to define minimal interface for a property.
Definition: propertyInterface.h:48
virtual char * encode(char *) const =0
ReaderWriter object that maintains a list of reader-writer variable bindings.
Definition: rwVariableBindings.h:27
static DtReaderWriterPropertyFactory * thePropertyFactory
Definition: rwProperties.h:399
bool myDebugEnabled
Definition: rwProperties.h:420
virtual bool addProperty(DtPropertyInterface *property)
Definition: propertyInterface.h:211
virtual void clearVariables()
Removes and deletes all variable items.
unsigned myDisRecordType
Definition: rwProperties.h:414
virtual void getSelf(DtlObjPtr args, const std::vector< DtFilename > &searchPaths=std::vector< DtFilename >(), const DtVariableBindingsList &variableBindings=nullVariableReference())
Reads in items, using the factory to read the correct types.
virtual void copyVariables(const DtRwVariableBindings &other)
Copies all variable items from another bindings list and adds them to the local one.
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...
const DtRwProperties * myProperties
Definition: rwProperties.h:108
Specialized type of reader/writer factory that supports properties.
Definition: readerWriterFactory.h:187
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
DtRwProperties * myProperties
Definition: rwProperties.h:63
bool isReadonly() const
Definition: readerWriter.h:214
const DtReaderWriter * findPropertyRw(const DtReaderWriter &properties, const DtString &propertyName)
Contains utility functions to make it easier to find and extract data from a set of extended properti...
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
KeyType key() const
Definition: rwProperties.h:427
std::vector< DtMergePathStruct > DtMergePath
Definition: readerWriterFactory.h:181
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is.
virtual DtPropertyInterface * property()
const char * source
Definition: lz4.h:442
virtual DtReaderWriter * readerWriter()=0
virtual bool isPublished() const =0
Whether this property should be published.
static const DtVariableBindingsList & nullVariableReference()
virtual void setDisRecordType(unsigned recType)=0
DtPropertyInterface * property()
Defines the DtPropertyInterface class, the interface for all property classes.
virtual unsigned disRecordType() const =0
If this property is published, which DIS record type should it use.
virtual void putData(std::string &fp, int indentLevel=0)
Deriving class overrides these to get/put class specific data.
KeyType key() const
Definition: rwProperties.h:474
virtual DtSymbolString propertyName() const =0
The name of this property.
std::vector< DtReaderWriterRegistryData * >::const_iterator myRegIter
Definition: rwProperties.h:109
DtPropertyInterface * myPreviousParentProp
Definition: rwProperties.h:422
Definition: rwProperties.h:25
virtual const DtPropertyInterface * findPropertyInterface(const DtString &propertyName) const
Definition: propertyInterface.h:115
A list of properties.
Definition: rwProperties.h:126
virtual void writeSelf(std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
Writes out registry data, but includes the type strings when writing.
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
virtual const char * propertyType() const =0
Typically returns reader/writer type.
virtual DtSymbolString name() const
Accessor for name of this readable/writable object.
virtual void setPropertyName(const DtString &propertyName)
Sets name of this property. Should generally only be called when initially created.
Definition: rwProperties.h:291
virtual void reset()=0
Override to clear out variable value.
MergeFlags
Determines how two lists of properties will be merged by the merge function.
Definition: propertyInterface.h:53