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);
204 return std::make_unique<GUIParamCx>(
getParamID(),
this, iChangeListener);
212 return std::make_unique<FObjectCxCallback>(
this, std::move(iChangeCallback));
247 inline bool update(T
const &iNewValue) {
return fPtr->update(iNewValue); }
253 template<
class ValueModifier>
254 inline bool updateIf(ValueModifier
const &iValueModifier) {
return fPtr->updateIf(iValueModifier); }
259 inline void setValue(T
const &iNewValue) {
fPtr->setValue(iNewValue); }
264 inline void setValue(T &&iNewValue) {
fPtr->setValue(std::move(iNewValue)); }
270 inline operator T
const &()
const {
return fPtr->getValue(); }
T const & getValue() const
Definition: GUIJmbParameter.h:267
tresult readFromStream(IBStreamer &iStreamer) override
Definition: GUIJmbParameter.h:158
void broadcast(T &&iValue)
Definition: GUIJmbParameter.h:286
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:202
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:254
GUIJmbParameter< T > * fPtr
Definition: GUIJmbParameter.h:299
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:259
std::unique_ptr< FObjectCx > connect(Parameters::IChangeListener *iChangeListener)
Definition: GUIJmbParameter.h:293
ParamType & getValue()
Definition: GUIJmbParameter.h:197
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:194
tresult writeToStream(IBStreamer &oStreamer) const override
Definition: GUIJmbParameter.h:167
IJmbParamDef const * getParamDef() const
Definition: GUIJmbParameter.h:47
T const * operator->() const
Definition: GUIJmbParameter.h:273
void setValue(T &&iNewValue)
Definition: GUIJmbParameter.h:264
virtual tresult writeToMessage(Message &oMessage) const =0
virtual tresult writeToStream(IBStreamer &oStreamer) const =0
bool exists() const
Definition: GUIJmbParameter.h:238
Definition: GUIJmbParameter.h:230
GUIJmbParameter(std::shared_ptr< JmbParamDef< T >> iParamDef)
Definition: GUIJmbParameter.h:94
Definition: GUIJmbParameter.h:86
ParamType fValue
Definition: GUIJmbParameter.h:216
ParamID getParamID() const
Definition: GUIJmbParameter.h:241
std::function< void()> ChangeCallback
Definition: Parameters.h:57
tresult readFromMessage(Message const &iMessage) override
Definition: GUIJmbParameter.h:179
tresult broadcast() const
Definition: GUIJmbParameter.h:276
GUIJmbParam(GUIJmbParameter< T > *iPtr=nullptr)
Definition: GUIJmbParameter.h:233
tresult writeToMessage(Message &oMessage) const override
Definition: GUIJmbParameter.h:188
void setMessageProducer(IMessageProducer *iMessageProducer)
Definition: GUIJmbParameter.h:74
IGUIJmbParameter(std::shared_ptr< IJmbParamDef > iParamDef)
Definition: GUIJmbParameter.h:44
virtual tresult readFromMessage(Message const &iMessage)=0
void writeToStream(std::ostream &oStream) const override
Definition: GUIJmbParameter.h:173
Definition: ParamDef.h:225
std::unique_ptr< FObjectCx > connect(Parameters::ChangeCallback iChangeCallback)
Definition: GUIJmbParameter.h:296
JmbParamDef< T > const * getParamDefT() const
Definition: GUIJmbParameter.h:101
void broadcast(T const &iValue)
Definition: GUIJmbParameter.h:279
bool update(T const &iNewValue)
Definition: GUIJmbParameter.h:247
Definition: Parameters.h:45
std::unique_ptr< FObjectCx > connect(Parameters::ChangeCallback iChangeCallback)
Definition: GUIJmbParameter.h:210