class: ewol::Object
Description:
Basic message classes for ewol system this class mermit at every Object to communicate between them.Associated Namespace:
Constructor and Destructor:
+ Object (void );
+ Object (const std::string & _name);
+ virtual ~Object (void );
Synopsis:
+ const char* const configName;
# void autoDestroy (void );
+ void removeObject (void );
+ const char* const getObjectType (void );
+ std::string getTypeDescription (void );
+ bool isTypeCompatible (const std::string & _type);
# void addObjectType (const char* _type);
# bool m_static;
+ bool getStatic (void );
+ int32_t getId (void );
# void addEventId (const char* _generateEventId);
# void generateEventId (const char* _generateEventId,
const std::string & _data);
# void sendMultiCast (const char* const _messageId,
const std::string & _data);
# void registerMultiCast (const char* const _messageId);
+ void registerOnEvent (ewol::Object* _destinationObject,
const char* _eventId,
const char* _eventIdgenerated,
const std::string & _overloadData);
+ void unRegisterOnEvent (ewol::Object* _destinationObject,
const char* _eventId);
+ virtual void onObjectRemove (ewol::Object* _removeObject);
+ virtual void onReceiveMessage (const ewol::object::Message & _msg);
# void registerConfig (const char* _config,
const char* _type,
const char* _control,
const char* _description,
const char* _default);
# virtual bool onSetConfig (const ewol::object::Config & _conf);
# virtual bool onGetConfig (const char* _config,
std::string & _result) const;
+ virtual const std::vector<ewol::object::ConfigElement> & getConfigList (void );
+ bool setConfig (const ewol::object::Config & _conf);
+ bool setConfig (const std::string & _config,
const std::string & _value);
+ bool setConfigNamed (const std::string & _objectName,
const std::string & _config,
const std::string & _value);
+ bool setConfigNamed (const std::string & _objectName,
const ewol::object::Config & _conf);
+ std::string getConfig (const char* _config) const;
+ std::string getConfig (const std::string & _config) const;
# std::string m_name;
+ const std::string & getName (void ) const;
+ void setName (const std::string & _name);
+ virtual bool loadXML (exml::Element* _node);
+ virtual bool storeXML (exml::Element* _node) const;
+ ewol::object::Manager & getObjectManager (void );
+ ewol::object::MultiCast & getMultiCast (void );
+ ewol::Context & getContext (void );
+ void setStatusResource (bool _val);
+ bool getStatusResource (void );
Object Hierarchy:
ewol::Object
+--> ewol::Widget
+--> ewol::Resource
Detail:
configName
+ const char* const configName;
Object
+ Object (void );
Constructor.
Object
+ Object (const std::string & _name);
Constructor.
Parameter [input]: _name Name of the Object.
~Object
+ virtual ~Object (void );
Destructor
autoDestroy
# void autoDestroy (void );
Auto-destroy the object
removeObject
+ void removeObject (void );
Asynchronous removing the object
getObjectType
+ const char* const getObjectType (void );
get the current Object type of the Object
Return: the last type name of the element
getTypeDescription
+ std::string getTypeDescription (void );
Get the herarchie of the Object type.
Return: descriptive string.
isTypeCompatible
+ bool isTypeCompatible (const std::string & _type);
check if the element herited from a specific type
Parameter [input]: _type Type to check.
Return: true if the element is compatible.
addObjectType
# void addObjectType (const char* _type);
Add a type of the list of Object.
Parameter [input]: _type new type to add.
m_static
# bool m_static;
set this variable at true if this element must not be auto destroy (exemple : use static object)
getStatic
+ bool getStatic (void );
get the static status of the Object == > mark at true if the user set the object mark as static allocated element ==> not auto remove element
Return: true if it might not be removed == > usefull for conficuration class
getId
+ int32_t getId (void );
get the UniqueId of the Object
Return: the requested ID
addEventId
# void addEventId (const char* _generateEventId);
add a specific event Id in the list to prevent wrong link on a Object
Parameter [input]: _generateEventId event Id to add
generateEventId
# void generateEventId (const char* _generateEventId,
const std::string & _data);
generate event on all registered Object
Parameter [input]: _generateEventId event Id that is curetly generated
Parameter [input]: _data data associated with the event
sendMultiCast
# void sendMultiCast (const char* const _messageId,
const std::string & _data);
generate Multicast event on all Object requested the event
Parameter [input]: _messageId Event Id that is generated
Parameter [input]: _data String that is send at all the destinations
registerMultiCast
# void registerMultiCast (const char* const _messageId);
Register of the arrival of a Multicast message
Parameter [input]: _messageId Event Id waiting for...
registerOnEvent
+ void registerOnEvent (ewol::Object* _destinationObject,
const char* _eventId,
const char* _eventIdgenerated,
const std::string & _overloadData);
Register an Object over an other to get event on the second...
Parameter [input]: _destinationObject pointer on the object that might be call when an event is generated
Parameter [input]: _eventId Event generate inside the object (note : "" event register on all event generated )
Parameter [input]: _eventIdgenerated event generated when call the distant Object.onReceiveMessage(...)
Parameter [input]: _overloadData When the user prever to receive a data specificly for this event ...
unRegisterOnEvent
+ void unRegisterOnEvent (ewol::Object* _destinationObject,
const char* _eventId);
Un-Register an Object over an other.
Parameter [input]: _destinationObject pointer on the object that might be call when an event is generated
Parameter [input]: _eventId Event generate inside the object (NULL to remove all event on this object)
onObjectRemove
+ virtual void onObjectRemove (ewol::Object* _removeObject);
Inform object that an other object is removed ...
Note: : Sub classes must call this class
Parameter [input]: _removObject Pointer on the Object remeved == > the user must remove all reference on this Object
onReceiveMessage
+ virtual void onReceiveMessage (const ewol::object::Message & _msg);
Receive a message from an other Object with a specific eventId and data
Parameter [input]: _msg Message handle
registerConfig
# void registerConfig (const char* _config,
const char* _type,
const char* _control,
const char* _description,
const char* _default);
the Object add a configuration capabilities
Parameter [input]: _config Configuration name.
Parameter [input]: _type Type of the config.
Parameter [input]: _control control of the current type.
Parameter [input]: _description Descritpion on the current type.
Parameter [input]: _default Default value of this parameter.
onSetConfig
# virtual bool onSetConfig (const ewol::object::Config & _conf);
Configuration requested to the curent Object
Parameter [input]: _conf Configuration handle.
Return: true if the parametere has been used
onGetConfig
# virtual bool onGetConfig (const char* _config,
std::string & _result) const;
Receive a configuration message from an other element system or from the curent Object
Parameter [input]: _config Configuration name.
Parameter [output]: _result Result of the request.
Return: true if the config is set
getConfigList
+ virtual const std::vector<ewol::object::ConfigElement> & getConfigList (void );
get all the configuration list
Return: The list of all parameter availlable in the widget
setConfig
+ bool setConfig (const ewol::object::Config & _conf);
Configuration requested to the curent Object (systrem mode)
Parameter [input]: _conf Configuration handle.
Return: true if config set correctly...
setConfig
+ bool setConfig (const std::string & _config,
const std::string & _value);
setConfigNamed
+ bool setConfigNamed (const std::string & _objectName,
const std::string & _config,
const std::string & _value);
setConfigNamed
+ bool setConfigNamed (const std::string & _objectName,
const ewol::object::Config & _conf);
getConfig
+ std::string getConfig (const char* _config) const;
Configuration get from the curent Object (systrem mode)
Parameter [input]: _config Configuration name.
Return: the config properties
getConfig
+ std::string getConfig (const std::string & _config) const;
m_name
# std::string m_name;
name of the element ...
getName
+ const std::string & getName (void ) const;
get the Object name
Return: The requested name
setName
+ void setName (const std::string & _name);
get the Widget name
Parameter [input]: _name The new name
loadXML
+ virtual bool loadXML (exml::Element* _node);
load properties with an XML node.
Parameter [input]: _node Pointer on the tinyXML node.
Return: true : All has been done corectly.<br/>false : An error occured.
storeXML
+ virtual bool storeXML (exml::Element* _node) const;
store properties in this XML node.
Parameter [input] [output]: _node Pointer on the tinyXML node.
Return: true : All has been done corectly.<br/>false : An error occured.
getObjectManager
+ ewol::object::Manager & getObjectManager (void );
Return: the requested object manager.
getMultiCast
+ ewol::object::MultiCast & getMultiCast (void );
Return: the requested object manager.
getContext
+ ewol::Context & getContext (void );
get the curent the system inteface.
Return: current reference on the instance.
setStatusResource
+ void setStatusResource (bool _val);
Declare this element as a resource (or singleton) this mean the element will
not be auto Remove at the end of the programm. It just notify that it is not removed.
Parameter [input]: _val Value of the type of the element.
getStatusResource
+ bool getStatusResource (void );
Get the resource status of the element.
Return: the resource status.
ewol::Object
+--> ewol::Widget
+--> ewol::Resource
Detail:
configName
+ const char* const configName;
Object
+ Object (void );Constructor.
Object
+ Object (const std::string & _name);Constructor.
Parameter [input]: | _name | Name of the Object. |
~Object
+ virtual ~Object (void );Destructor
autoDestroy
# void autoDestroy (void );Auto-destroy the object
removeObject
+ void removeObject (void );Asynchronous removing the object
getObjectType
+ const char* const getObjectType (void );get the current Object type of the Object
Return: | the last type name of the element |
getTypeDescription
+ std::string getTypeDescription (void );Get the herarchie of the Object type.
Return: | descriptive string. |
isTypeCompatible
+ bool isTypeCompatible (const std::string & _type);check if the element herited from a specific type
Parameter [input]: | _type | Type to check. |
Return: | true if the element is compatible. |
addObjectType
# void addObjectType (const char* _type);Add a type of the list of Object.
Parameter [input]: | _type | new type to add. |
m_static
# bool m_static;set this variable at true if this element must not be auto destroy (exemple : use static object)
getStatic
+ bool getStatic (void );get the static status of the Object == > mark at true if the user set the object mark as static allocated element ==> not auto remove element
Return: | true if it might not be removed == > usefull for conficuration class |
getId
+ int32_t getId (void );get the UniqueId of the Object
Return: | the requested ID |
addEventId
# void addEventId (const char* _generateEventId);add a specific event Id in the list to prevent wrong link on a Object
Parameter [input]: | _generateEventId | event Id to add |
generateEventId
# void generateEventId (const char* _generateEventId,generate event on all registered Object
const std::string & _data);
Parameter [input]: | _generateEventId | event Id that is curetly generated | Parameter [input]: | _data | data associated with the event |
sendMultiCast
# void sendMultiCast (const char* const _messageId,generate Multicast event on all Object requested the event
const std::string & _data);
Parameter [input]: | _messageId | Event Id that is generated | Parameter [input]: | _data | String that is send at all the destinations |
registerMultiCast
# void registerMultiCast (const char* const _messageId);Register of the arrival of a Multicast message
Parameter [input]: | _messageId | Event Id waiting for... |
registerOnEvent
+ void registerOnEvent (ewol::Object* _destinationObject,Register an Object over an other to get event on the second...
const char* _eventId,
const char* _eventIdgenerated,
const std::string & _overloadData);
Parameter [input]: | _destinationObject | pointer on the object that might be call when an event is generated | Parameter [input]: | _eventId | Event generate inside the object (note : "" event register on all event generated ) | Parameter [input]: | _eventIdgenerated | event generated when call the distant Object.onReceiveMessage(...) | Parameter [input]: | _overloadData | When the user prever to receive a data specificly for this event ... |
unRegisterOnEvent
+ void unRegisterOnEvent (ewol::Object* _destinationObject,Un-Register an Object over an other.
const char* _eventId);
Parameter [input]: | _destinationObject | pointer on the object that might be call when an event is generated | Parameter [input]: | _eventId | Event generate inside the object (NULL to remove all event on this object) |
onObjectRemove
+ virtual void onObjectRemove (ewol::Object* _removeObject);Inform object that an other object is removed ...
Note: : Sub classes must call this class
Parameter [input]: | _removObject | Pointer on the Object remeved == > the user must remove all reference on this Object |
onReceiveMessage
+ virtual void onReceiveMessage (const ewol::object::Message & _msg);Receive a message from an other Object with a specific eventId and data
Parameter [input]: | _msg | Message handle |
registerConfig
# void registerConfig (const char* _config,the Object add a configuration capabilities
const char* _type,
const char* _control,
const char* _description,
const char* _default);
Parameter [input]: | _config | Configuration name. | Parameter [input]: | _type | Type of the config. | Parameter [input]: | _control | control of the current type. | Parameter [input]: | _description | Descritpion on the current type. | Parameter [input]: | _default | Default value of this parameter. |
onSetConfig
# virtual bool onSetConfig (const ewol::object::Config & _conf);Configuration requested to the curent Object
Parameter [input]: | _conf | Configuration handle. |
Return: | true if the parametere has been used |
onGetConfig
# virtual bool onGetConfig (const char* _config,Receive a configuration message from an other element system or from the curent Object
std::string & _result) const;
Parameter [input]: | _config | Configuration name. | Parameter [output]: | _result | Result of the request. |
Return: | true if the config is set |
getConfigList
+ virtual const std::vector<ewol::object::ConfigElement> & getConfigList (void );get all the configuration list
Return: | The list of all parameter availlable in the widget |
setConfig
+ bool setConfig (const ewol::object::Config & _conf);Configuration requested to the curent Object (systrem mode)
Parameter [input]: | _conf | Configuration handle. |
Return: | true if config set correctly... |
setConfig
+ bool setConfig (const std::string & _config,
const std::string & _value);
setConfigNamed
+ bool setConfigNamed (const std::string & _objectName,
const std::string & _config,
const std::string & _value);
setConfigNamed
+ bool setConfigNamed (const std::string & _objectName,
const ewol::object::Config & _conf);
getConfig
+ std::string getConfig (const char* _config) const;Configuration get from the curent Object (systrem mode)
Parameter [input]: | _config | Configuration name. |
Return: | the config properties |
getConfig
+ std::string getConfig (const std::string & _config) const;
m_name
# std::string m_name;name of the element ...
getName
+ const std::string & getName (void ) const;get the Object name
Return: | The requested name |
setName
+ void setName (const std::string & _name);get the Widget name
Parameter [input]: | _name | The new name |
loadXML
+ virtual bool loadXML (exml::Element* _node);load properties with an XML node.
Parameter [input]: | _node | Pointer on the tinyXML node. |
Return: | true : All has been done corectly.<br/>false : An error occured. |
storeXML
+ virtual bool storeXML (exml::Element* _node) const;store properties in this XML node.
Parameter [input] [output]: | _node | Pointer on the tinyXML node. |
Return: | true : All has been done corectly.<br/>false : An error occured. |
getObjectManager
+ ewol::object::Manager & getObjectManager (void );
Return: | the requested object manager. |
getMultiCast
+ ewol::object::MultiCast & getMultiCast (void );
Return: | the requested object manager. |
getContext
+ ewol::Context & getContext (void );get the curent the system inteface.
Return: | current reference on the instance. |
setStatusResource
+ void setStatusResource (bool _val);Declare this element as a resource (or singleton) this mean the element will not be auto Remove at the end of the programm. It just notify that it is not removed.
Parameter [input]: | _val | Value of the type of the element. |
getStatusResource
+ bool getStatusResource (void );Get the resource status of the element.
Return: | the resource status. |