16 #include <boost/optional.hpp>
41 template <
typename RwType>
51 template <
typename SpecificRwType>
53 template <
typename SpecificRwType>
59 template <
typename SpecificRwType>
61 template <
typename SpecificRwType>
70 template <
typename SpecificRwType>
101 template <
typename T>
109 template <
typename T>
114 template <
typename T>
116 template <
typename T>
127 template <
typename T>
129 template <
typename T>
134 template <
typename K,
typename T>
144 template <
typename K,
typename T>
148 template <
typename T>
152 template <
typename T>
167 template <
typename SpecificRwType>
169 template <
typename SpecificRwType>
175 #include "propertyUtils.inl"
bool findAndSetListProperty(DtReaderWriter &properties, const DtString &propertyName, const std::list< T > &l)
Finds the ReaderWriter object in the given set of properties with the specified name, checks that it is a list with elements of type T, and sets it. This effectively a convenience function for calling findPropertyRw() and setting each item in the list. Only works with lists of simple data types (i.e. numerical values, bools, strings). Returns false if no property with that name can be found.
SpecificRwType * addProperty(DtReaderWriter &properties, const DtString &propertyName)
Adds a property with the specified name to the given set of properties. SpecificRwType must be a subc...
boost::optional< T > getPropertyValue(const DtReaderWriter *prop)
Extracts the value from the given ReaderWriter property. The template parameter type must be an appro...
Definition: readerWriter.h:85
boost::optional< T > findPropertyValue(const DtReaderWriter &properties, const DtString &propertyName)
Finds the ReaderWriter object in the given set of properties with the specified name and returns its ...
const SpecificRwType * findMapItem(const DtRwPropertiesMap &propertiesMap, const DtString &itemName)
Finds the ReaderWriter object in the given DtRwPropertiesMap that matches the specified name...
ReaderWriter object that maintains a list of reader-writer variable bindings. It keeps a list of name...
Definition: rwVariableBindings.h:27
const SpecificRwType * findProperty(const DtReaderWriter &properties, const DtString &propertyName)
Finds the ReaderWriter object in the given set of properties with the specified name. Then verifies that the ReaderWriter matches the type specified as the template argument. Returns a valid pointer if successful.
boost::optional< T > findVariableBindingValue(const DtReaderWriter &properties, const DtString &propertyName)
Same as findPropertyValue but assumes variable bindings.
Defines the DtRwPropertiesStructure class, a structure containing fields, which are themselves proper...
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...
void setMapProperty(DtReaderWriter *prop, const std::map< K, T > &l)
Sets the values of the given map ReaderWriter property.
Acts as a map for properties. A map is a definition that has a key and a prototype, with values being the key and prototype pair. The key can only be a string (DtRwStringType), int (DtRwIntType, DtRwInt8Type, DtRwInt16Type, DtRwInt32Type), or real (DtRwRealType, DtRwReal32Type, DtRwReal64Type).
Definition: rwPropertiesMap.h:41
const DtReaderWriter * findVariableBindingValueRw(const DtReaderWriter &properties, const DtString &propertyName)
Same as findPropertyRw but for variable bindings.
const SpecificRwType * findTypedProperty(const DtReaderWriter &properties, const DtString &propertyName)
Same as findProperty() but with a specific name to avoid name conflicts in some use cases...
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:126
void setPropertyValue(DtReaderWriter *prop, T val)
Sets the value of the given ReaderWriter property. The template parameter type must be an appropriate...
bool findAndSetMapProperty(DtReaderWriter &properties, const DtString &propertyName, const std::map< K, T > &m)
Finds the ReaderWriter object in the given set of properties with the specified name, checks that it is a map with keys of type K and elements of type T, and sets it. This effectively a convenience function for calling findPropertyRw() and setting each item in the map. Only works with lists of simple data types (i.e. numerical values, bools, strings). Returns false if no property with that name can be found.
const DtReaderWriter * findMapItemRw(const DtRwPropertiesMap &propertiesMap, const DtString &itemName)
Finds the generic ReaderWriter object in the given DtRwPropertiesMap that matches the specified name...
bool findAndSetPropertyValue(DtReaderWriter &properties, const DtString &propertyName, T val)
Finds the ReaderWriter object in the given set of properties with the specified name and sets its val...
RwType * findVariableBindingWithDefault(DtRwVariableBindings &variableBindings, DtRwVariableBindings &defaultBindings, const DtString &variableName)
Finds a RW corresponding to the given variable name, as with the above functions, but also looks in t...
void setListProperty(DtReaderWriter *prop, const std::list< T > &l)
Sets the values of the given list ReaderWriter property.