20 #ifndef __OpenKarto_Parameter_h__ 21 #define __OpenKarto_Parameter_h__ 108 return m_Description;
139 throw karto::Exception(
"ParameterDescription::GetFieldName() - Invalid argument, index must be [0;3]");
142 return m_FieldNames[index];
154 m_FieldNames[0] = rX;
155 m_FieldNames[1] = rY;
156 m_FieldNames[2] = rZ;
157 m_FieldNames[3] = rW;
166 return m_nDecimalPlaces;
175 m_nDecimalPlaces = decimalPlaces;
253 return m_pDescription->GetName();
262 return m_pDescription->GetDisplayName();
271 return m_pDescription->GetDescription();
280 return m_pDescription->GetFlags();
289 return m_pDescription;
298 return m_pDescription;
311 virtual void SetValueFromString(
const karto::String& rStringValue) = 0;
316 virtual void SetToDefaultValue() = 0;
322 virtual void InitializeParameters();
406 const ParameterList& GetParameters()
const;
412 ParameterList& GetParameters();
450 InitializeParameters();
465 InitializeParameters();
494 kt_bool changed = !CompareValue(rValue);
510 return m_DefaultValue;
519 m_DefaultValue = rValue;
549 SetValue(m_DefaultValue);
558 SetDefaultValue(GetValue());
568 return m_Value == rValue;
784 virtual void SetValueFromString(
const karto::String& rStringValue);
812 #endif // __OpenKarto_Parameter_h__
karto::SmartPointer< ParameterDescription > m_pDescription
ParameterSet * m_pParameterSet
const ParameterDescription * GetParameterDescription() const
SmartPointer< ParameterSet > ParameterSetPtr
static kt_bool FromString(const String &rStringValue, kt_bool &rValue)
const karto::String & GetDisplayName() const
List< SmartPointer< AbstractParameter > > ParameterList
virtual const T & GetValue() const
static EventArguments & Empty()
karto::String m_DisplayName
const karto::String & GetFieldName(kt_int32u index) const
Parameter(ParameterSet *pParameterSet, const karto::String &rName, const karto::String &rDisplayName, const karto::String &rDescription, const T &rValue)
ParameterDescription * GetParameterDescription()
virtual void SetValueFromString(const karto::String &rStringValue)
void SetNumberOfDecimalPlaces(kt_int32s decimalPlaces)
const karto::String & GetName() const
virtual void SetValue(const T &rValue)
virtual void SetDefaultValue(const T &rValue)
kt_int32s GetNumberOfDecimalPlaces() const
void SetFlags(kt_int32s flags)
virtual void SetToDefaultValue()
const karto::String & GetName() const
static String ToString(const char *value)
Parameter(ParameterDescription *pDescription, const T &rValue)
const karto::String & GetDescription() const
void SetFieldNames(const karto::String &rX="X", const karto::String &rY="Y", const karto::String &rZ="Z", const karto::String &rW="W")
virtual const karto::String GetValueAsString() const
virtual T & GetDefaultValue()
KARTO_TYPE(Grid< kt_int8u >)
kt_int32s GetFlags() const
const karto::String & GetDescription() const
signed long long kt_int64s
BasicEvent< EventArguments > Changed
ParameterSetPrivate * m_pPrivate
virtual void InitializeParameters()
kt_bool CompareValue(const T &rValue)
const karto::String & GetDisplayName() const
kt_int32s GetFlags() const
karto::String m_Description
ParameterEnumPrivate * m_pPrivate
kt_int32s m_nDecimalPlaces