35 , m_DisplayName(rDisplayName)
36 , m_Description(rDescription)
43 m_FieldNames[1] =
"Y";
44 m_FieldNames[2] =
"Z";
45 m_FieldNames[3] =
"W";
57 : m_pDescription(pDescription)
58 , m_pParameterSet(pParameterSet)
63 AbstractParameter::~AbstractParameter()
81 typedef std::map<karto::String, SmartPointer<AbstractParameter> >
ParameterMap;
92 ParameterSet::~ParameterSet()
99 if (pParameter != NULL)
108 throw Exception(
"ParameterSet::AddParameter - Paramter with name: '" + pParameter->
GetName() +
"' already exists. Please rename property before adding again.");
115 if (pParameter != NULL)
181 ParameterEnum::~ParameterEnum()
195 validValues << iter->name <<
", ";
198 throw Exception(
"ParameterEnum::SetValueFromString - Unable to set enum: '" + rStringValue +
"'. Valid values are: " + validValues.
ToString());
211 throw Exception(
"ParameterEnum::GetValueAsString - Unable to lookup enum");
225 enumPair.
name = rName;
226 enumPair.
value = value;
243 enumPairList.
Add(*iter);
ParameterEnum(ParameterSet *pParameterSet, const karto::String &rName, const karto::String &rDisplayName, const karto::String &rDescription, kt_int64s value)
ParameterSet * m_pParameterSet
#define forEach(listtype, list)
virtual void Add(const T &rValue)
virtual kt_bool Remove(const T &rValue)
void RemoveParameter(AbstractParameter *pParameter)
AbstractParameter(ParameterDescription *pDescription, ParameterSet *pParameterSet=NULL)
virtual void SetValue(const kt_int64s &rValue)
const ParameterList & GetParameters() const
void Log(LogLevel level, const karto::String &rMessage)
std::vector< EnumPair > EnumPairVector
const karto::String & GetName() const
karto::String m_FieldNames[4]
static String ToString(const char *value)
std::map< karto::String, SmartPointer< AbstractParameter > > ParameterMap
ParameterDescription(const karto::String &rName, const karto::String &rDisplayName="", const karto::String &rDescription="")
AbstractParameter * GetParameter(const karto::String &rParameterName) const
void AddParameter(AbstractParameter *pParameter)
virtual ~ParameterDescription()
const String & ToString() const
void DefineEnumValue(const String &rName, kt_int64s value)
signed long long kt_int64s
virtual void SetValueFromString(const karto::String &rStringValue)
virtual const karto::String GetValueAsString() const
ParameterSetPrivate * m_pPrivate
ParameterList m_Parameters
EnumPairVector m_EnumPairs
ParameterMap m_ParametersMap
virtual void InitializeParameters()
ParameterEnumPrivate * m_pPrivate
const EnumPairList GetEnumValues() const