18 #include "internal/berryCommandUtils.h"
37 int compareTo = CommandUtils::Compare(
defined, castedObject->
defined);
40 compareTo = CommandUtils::Compare(
id, castedObject->
id);
48 const bool definedChanged = !this->
defined;
51 this->type = type.isNull() ? QObject::staticMetaObject.className() : type;
52 this->parameterTypeConverter = parameterTypeConverter;
56 this->FireParameterTypeChanged(event);
63 throw NotDefinedException(
64 "Cannot use GetValueConverter() with an undefined ParameterType");
67 return parameterTypeConverter.data();
74 throw NotDefinedException(
75 "Cannot use IsCompatible() with an undefined ParameterType");
77 return value->inherits(qPrintable(type));
89 QTextStream stringBuffer(&
str);
90 stringBuffer <<
"ParameterType(" <<
id <<
"," <<
defined <<
")";
99 const bool definedChanged =
defined;
102 parameterTypeConverter.clear();
106 this->FireParameterTypeChanged(event);
115 void ParameterType::FireParameterTypeChanged(
const SmartPointer<
120 throw ctkInvalidArgumentException(
"Cannot send a null event to listeners.");
QString ToString() const override
ParameterType(const QString &id)
Light weight base class for most BlueBerry classes.
void RemoveListener(IParameterTypeListener *listener)
void Define(const QString &type, const QSharedPointer< IParameterValueConverter > ¶meterTypeConverter)
void RemoveListener(IParameterTypeListener *listener)
void AddListener(IParameterTypeListener *listener)
bool operator<(const Object *object) const override
Event parameterTypeChanged
bool IsCompatible(const QObject *const value) const
void AddListener(IParameterTypeListener *listener)
IParameterValueConverter * GetValueConverter() const