7 #ifndef __vtkPlusParameters_h 8 #define __vtkPlusParameters_h 10 #include "vtkPlusDataCollectionExport.h" 31 ParameterInfo(std::string defaultValue) : Value(defaultValue), Set(false), Pending(false) {};
65 virtual PlusStatus ReadConfiguration(vtkXMLDataElement* deviceConfig);
72 virtual PlusStatus WriteConfiguration(vtkXMLDataElement* deviceConfig);
87 if (keyIt != this->Parameters.end() && keyIt->second.Set ==
false)
91 else if (keyIt == this->Parameters.end())
98 ss.str(it->second.Value);
111 std::stringstream ss;
113 if (this->Parameters[paramName].Value != ss.str())
115 this->Parameters[paramName].Pending =
true;
117 this->Parameters[paramName].Value = ss.str();
118 this->Parameters[paramName].Set =
true;
125 bool IsSet(
const std::string& paramName)
const;
130 bool IsPending(
const std::string& paramName)
const;
134 PlusStatus SetPending(
const std::string& paramName,
bool pending);
137 virtual void PrintSelf(ostream& os, vtkIndent indent)
VTK_OVERRIDE;
145 ParameterMap Parameters;
bool Pending
Flag indicating whether the parameter is changed but has not been set to device.
ParameterMap::iterator ParameterMapIterator
This class is used as the basis to store a configuration of generic parameters for any device....
static const char * NAME_TAG
static const char * XML_ELEMENT_TAG
PlusStatus SetValue(const std::string ¶mName, T aValue)
ParameterMap::const_iterator ParameterMapConstIterator
PlusStatus GetValue(const std::string ¶mName, T &outputValue) const
std::map< std::string, ParameterInfo > ParameterMap
static const char * VALUE_TAG
static const char * PARAMETER_TAG