class: ewol::object::template<T> Signal
Description:
Synopsis:
+ Signal (ewol::object::SignalList & _objectLink,
const std::string & _name,
const std::string & _description);
+ virtual ~Signal ();
+ void bind (std::shared_ptr<ewol::Object> _obj,
void(TYPE::*_func)(constT & ));
+ void connect (std::shared_ptr<ewol::Object> _obj,
std::function<void(constT&)> _function);
+ void release (std::shared_ptr<ewol::Object> _obj);
+ void emit (const T & _data);
Object Hierarchy:
+SignalBase
+--> ewol::object::Signal
Detail:
Signal
+ Signal (ewol::object::SignalList & _objectLink,
const std::string & _name,
const std::string & _description);
Create a parameter with a specific type.
Parameter [input]: _objectLink reference on the parameter lister.
Parameter [input]: _name Static name of the parameter.
Parameter [input]: _defaultValue Default value of the parameter.
Parameter [input]: _min Minumum value.
Parameter [input]: _max Maximum value.
Parameter [input]: _description description of the parameter.
~Signal
+ virtual ~Signal ();
Destructor.
bind
+ void bind (std::shared_ptr<ewol::Object> _obj,
void(TYPE::*_func)(constT & ));
Bind a callback function to the current signal (generic methis (simplest))
Parameter [input]: _obj Shared pointer on the caller object
Parameter [input]: _func Link on the fuction that might be called (inside a class)
connect
+ void connect (std::shared_ptr<ewol::Object> _obj,
std::function<void(constT&)> _function);
Advanced binding a callback function to the current signal.
Parameter [input]: _obj Shared pointer on the caller object
Parameter [input]: _func functor to call (do it yourself)
release
+ void release (std::shared_ptr<ewol::Object> _obj);
remove link on the signal.
Parameter [input]: _obj shared pointer on the removing object
emit
+ void emit (const T & _data);
Generate a signal on all interface listening.
Parameter [input]: _data data to emit
+SignalBase
+--> ewol::object::Signal
Detail:
Signal
+ Signal (ewol::object::SignalList & _objectLink,Create a parameter with a specific type.
const std::string & _name,
const std::string & _description);
Parameter [input]: | _objectLink | reference on the parameter lister. | Parameter [input]: | _name | Static name of the parameter. | Parameter [input]: | _defaultValue | Default value of the parameter. | Parameter [input]: | _min | Minumum value. | Parameter [input]: | _max | Maximum value. | Parameter [input]: | _description | description of the parameter. |
~Signal
+ virtual ~Signal ();Destructor.
bind
+ void bind (std::shared_ptr<ewol::Object> _obj,Bind a callback function to the current signal (generic methis (simplest))
void(TYPE::*_func)(constT & ));
Parameter [input]: | _obj | Shared pointer on the caller object | Parameter [input]: | _func | Link on the fuction that might be called (inside a class) |
connect
+ void connect (std::shared_ptr<ewol::Object> _obj,Advanced binding a callback function to the current signal.
std::function<void(constT&)> _function);
Parameter [input]: | _obj | Shared pointer on the caller object | Parameter [input]: | _func | functor to call (do it yourself) |
release
+ void release (std::shared_ptr<ewol::Object> _obj);remove link on the signal.
Parameter [input]: | _obj | shared pointer on the removing object |
emit
+ void emit (const T & _data);Generate a signal on all interface listening.
Parameter [input]: | _data | data to emit |