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.


~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


getTypeDescription

+ std::string getTypeDescription (void );
Get the herarchie of the Object type.


isTypeCompatible

+ bool isTypeCompatible (const std::string & _type);
check if the element herited from a specific type


addObjectType

# void addObjectType (const char* _type);
Add a type of the list of Object.


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


getId

+ int32_t getId (void );
get the UniqueId of the Object


addEventId

# void addEventId (const char* _generateEventId);
add a specific event Id in the list to prevent wrong link on a Object


generateEventId

# void generateEventId (const char* _generateEventId,
const
std::string & _data);
generate event on all registered Object


sendMultiCast

# void sendMultiCast (const char* const _messageId,
const
std::string & _data);
generate Multicast event on all Object requested the event


registerMultiCast

# void registerMultiCast (const char* const _messageId);
Register of the arrival of a Multicast message


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...


unRegisterOnEvent

+ void unRegisterOnEvent (ewol::Object* _destinationObject,
const char* _eventId);
Un-Register an Object over an other.


onObjectRemove

+ virtual void onObjectRemove (ewol::Object* _removeObject);
Inform object that an other object is removed ...
Note: : Sub classes must call this class


onReceiveMessage

+ virtual void onReceiveMessage (const ewol::object::Message & _msg);
Receive a message from an other Object with a specific eventId and data


registerConfig

# void registerConfig (const char* _config,
const char* _type,
const char* _control,
const char* _description,
const char* _default);
the Object add a configuration capabilities


onSetConfig

# virtual bool onSetConfig (const ewol::object::Config & _conf);
Configuration requested to the curent Object


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


getConfigList

+ virtual const std::vector<ewol::object::ConfigElement> & getConfigList (void );
get all the configuration list


setConfig

+ bool setConfig (const ewol::object::Config & _conf);
Configuration requested to the curent Object (systrem mode)


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)


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


setName

+ void setName (const std::string & _name);
get the Widget name


loadXML

+ virtual bool loadXML (exml::Element* _node);
load properties with an XML node.


storeXML

+ virtual bool storeXML (exml::Element* _node) const;
store properties in this XML node.


getObjectManager

+ ewol::object::Manager & getObjectManager (void );


getMultiCast

+ ewol::object::MultiCast & getMultiCast (void );


getContext

+ ewol::Context & getContext (void );
get the curent the system inteface.


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.


getStatusResource

+ bool getStatusResource (void );
Get the resource status of the element.