20 #include <base/source/fobject.h> 56 virtual tresult
writeToStream(IBStreamer &oStreamer)
const = 0;
91 using FObject::update;
97 fValue{iParamDef->fDefaultValue}
126 template<
class ValueModifier>
129 if(iValueModifier(&
fValue))
153 fValue = std::move(iValue);
211 return std::make_unique<GUIParamCx>(
getParamID(),
this, iChangeListener);
219 return std::make_unique<FObjectCxCallback>(
this, std::move(iChangeCallback));
254 inline bool update(T
const &iNewValue) {
return fPtr->update(iNewValue); }
260 template<
class ValueModifier>
261 inline bool updateIf(ValueModifier
const &iValueModifier) {
return fPtr->updateIf(iValueModifier); }
266 inline void setValue(T
const &iNewValue) {
fPtr->setValue(iNewValue); }
271 inline void setValue(T &&iNewValue) {
fPtr->setValue(std::move(iNewValue)); }
281 inline operator T
const &()
const {
return fPtr->getValue(); }
T const & getValue() const
Definition: GUIJmbParameter.h:278
tresult readFromStream(IBStreamer &iStreamer) override
Definition: GUIJmbParameter.h:165
void broadcast(T &&iValue)
Definition: GUIJmbParameter.h:297
UTF8String ParamType
Definition: GUIJmbParameter.h:89
tresult handleMessage(Message const &iMessage) override
Definition: GUIJmbParameter.h:68
std::unique_ptr< FObjectCx > connect(Parameters::IChangeListener *iChangeListener)
Definition: GUIJmbParameter.h:209
bool update(ParamType const &iValue)
Definition: GUIJmbParameter.h:111
virtual tresult readFromStream(IBStreamer &iStreamer)=0
tresult broadcast() const
Definition: GUIJmbParameter.cpp:29
Definition: ParamDef.h:199
bool updateIf(ValueModifier const &iValueModifier)
Definition: GUIJmbParameter.h:127
bool updateIf(ValueModifier const &iValueModifier)
Definition: GUIJmbParameter.h:261
GUIJmbParameter< T > * fPtr
Definition: GUIJmbParameter.h:310
Definition: GUIJmbParameter.h:40
Definition: MessageProducer.h:33
Definition: Messaging.h:43
IMessageProducer * fMessageProducer
Definition: GUIJmbParameter.h:78
void setValue(T const &iNewValue)
Definition: GUIJmbParameter.h:266
std::unique_ptr< FObjectCx > connect(Parameters::IChangeListener *iChangeListener)
Definition: GUIJmbParameter.h:304
ParamType & getValue()
Definition: GUIJmbParameter.h:204
Definition: MessageHandler.h:30
void setValue(ParamType const &iValue)
Definition: GUIJmbParameter.h:141
void setValue(ParamType &&iValue)
Definition: GUIJmbParameter.h:151
ParamID getParamID() const
Definition: GUIJmbParameter.h:50
std::shared_ptr< IJmbParamDef > fParamDef
Definition: GUIJmbParameter.h:77
ParamType const & getValue() const
Definition: GUIJmbParameter.h:201
tresult writeToStream(IBStreamer &oStreamer) const override
Definition: GUIJmbParameter.h:174
IJmbParamDef const * getParamDef() const
Definition: GUIJmbParameter.h:47
T const * operator->() const
Definition: GUIJmbParameter.h:284
void setValue(T &&iNewValue)
Definition: GUIJmbParameter.h:271
virtual tresult writeToMessage(Message &oMessage) const =0
virtual tresult writeToStream(IBStreamer &oStreamer) const =0
bool exists() const
Definition: GUIJmbParameter.h:245
Definition: GUIJmbParameter.h:237
GUIJmbParameter(std::shared_ptr< JmbParamDef< T >> iParamDef)
Definition: GUIJmbParameter.h:94
Definition: GUIJmbParameter.h:86
ParamType fValue
Definition: GUIJmbParameter.h:223
ParamID getParamID() const
Definition: GUIJmbParameter.h:248
std::function< void()> ChangeCallback
Definition: Parameters.h:57
tresult readFromMessage(Message const &iMessage) override
Definition: GUIJmbParameter.h:186
tresult broadcast() const
Definition: GUIJmbParameter.h:287
GUIJmbParam(GUIJmbParameter< T > *iPtr=nullptr)
Definition: GUIJmbParameter.h:240
tresult writeToMessage(Message &oMessage) const override
Definition: GUIJmbParameter.h:195
void setMessageProducer(IMessageProducer *iMessageProducer)
Definition: GUIJmbParameter.h:74
IGUIJmbParameter(std::shared_ptr< IJmbParamDef > iParamDef)
Definition: GUIJmbParameter.h:44
void resetToDefault()
Definition: GUIJmbParameter.h:159
virtual tresult readFromMessage(Message const &iMessage)=0
void writeToStream(std::ostream &oStream) const override
Definition: GUIJmbParameter.h:180
Definition: ParamDef.h:225
std::unique_ptr< FObjectCx > connect(Parameters::ChangeCallback iChangeCallback)
Definition: GUIJmbParameter.h:307
JmbParamDef< T > const * getParamDefT() const
Definition: GUIJmbParameter.h:101
void broadcast(T const &iValue)
Definition: GUIJmbParameter.h:290
void resetToDefault()
Definition: GUIJmbParameter.h:275
bool update(T const &iNewValue)
Definition: GUIJmbParameter.h:254
Definition: Parameters.h:45
std::unique_ptr< FObjectCx > connect(Parameters::ChangeCallback iChangeCallback)
Definition: GUIJmbParameter.h:217