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 ();
+ virtual ~Object ();
Synopsis:
# void init ();
# void init (const std::string & _name);
+ DECLARE_FACTORY (Object );
+ bool objectHasBeenCorectlyInit ();
# std::weak_ptr<Object> m_parent;
# bool m_destroy;
# void autoDestroy ();
+ virtual void destroy ();
+ bool isDestroyed () const;
+ virtual void requestDestroyFromChild (const std::shared_ptr<Object> & _child);
+ virtual void setParent (const std::shared_ptr<Object> & _newParent);
+ virtual void removeParent ();
+ const char* const getObjectType ();
+ std::string getTypeDescription ();
+ bool isTypeCompatible (const std::string & _type);
# void addObjectType (const char* _type);
# bool m_static;
+ bool getStatic ();
+ int32_t getId ();
+ bool parameterSetOnWidgetNamed (const std::string & _objectName,
const std::string & _config,
const std::string & _value);
# ewol::object::Param<std::string> m_name;
+ const std::string & getName () const;
+ void setName (const std::string & _name);
+ virtual bool loadXML (exml::Element* _node);
+ virtual bool storeXML (exml::Element* _node) const;
+ ewol::object::Manager & getObjectManager () const;
+ ewol::Context & getContext () const;
+ void setStatusResource (bool _val);
+ bool getStatusResource () const;
+ std::shared_ptr<ewol::Object> getObjectNamed (const std::string & _objectName) const;
+ virtual std::shared_ptr<ewol::Object> getSubObjectNamed (const std::string & _objectName);
Object Hierarchy:
+std::enable_shared_from_this<Object>
+ewol::object::ParameterList
+ewol::object::SignalList
+--> ewol::Object
+--> ewol::Widget
+--> ewol::object::Worker
+--> ewol::Resource
Detail:
Object
# Object ();
Constructor.
init
# void init ();
# void init (const std::string & _name);
DECLARE_FACTORY
+ DECLARE_FACTORY (Object );
Factory
~Object
+ virtual ~Object ();
Destructor
objectHasBeenCorectlyInit
+ bool objectHasBeenCorectlyInit ();
m_parent
# std::weak_ptr<Object> m_parent;
m_destroy
# bool m_destroy;
autoDestroy
# void autoDestroy ();
Auto-destroy the object
destroy
+ virtual void destroy ();
isDestroyed
+ bool isDestroyed () const;
requestDestroyFromChild
+ virtual void requestDestroyFromChild (const std::shared_ptr<Object> & _child);
setParent
+ virtual void setParent (const std::shared_ptr<Object> & _newParent);
removeParent
+ virtual void removeParent ();
getObjectType
+ const char* const getObjectType ();
get the current Object type of the Object
Return: the last type name of the element
getTypeDescription
+ std::string getTypeDescription ();
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 ();
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 ();
get the UniqueId of the Object
Return: the requested ID
parameterSetOnWidgetNamed
+ bool parameterSetOnWidgetNamed (const std::string & _objectName,
const std::string & _config,
const std::string & _value);
m_name
# ewol::object::Param<std::string> m_name;
name of the element ...
getName
+ const std::string & getName () 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 () const;
Return: the requested object manager.
getContext
+ ewol::Context & getContext () const;
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 () const;
Get the resource status of the element.
Return: the resource status.
getObjectNamed
+ std::shared_ptr<ewol::Object> getObjectNamed (const std::string & _objectName) const;
Retrive an object with his name (in the global list)
Parameter [input]: _name Name of the object
Return: the requested object or nullptr
getSubObjectNamed
+ virtual std::shared_ptr<ewol::Object> getSubObjectNamed (const std::string & _objectName);
Retrive an object with his name (in the global list)
Parameter [input]: _name Name of the object
Return: the requested object or nullptr
+std::enable_shared_from_this<Object>
+ewol::object::ParameterList
+ewol::object::SignalList
+--> ewol::Object
+--> ewol::Widget
+--> ewol::object::Worker
+--> ewol::Resource
Detail:
Object
# Object ();Constructor.
init
# void init ();
# void init (const std::string & _name);
DECLARE_FACTORY
+ DECLARE_FACTORY (Object );Factory
~Object
+ virtual ~Object ();Destructor
objectHasBeenCorectlyInit
+ bool objectHasBeenCorectlyInit ();
m_parent
# std::weak_ptr<Object> m_parent;
m_destroy
# bool m_destroy;
autoDestroy
# void autoDestroy ();Auto-destroy the object
destroy
+ virtual void destroy ();
isDestroyed
+ bool isDestroyed () const;
requestDestroyFromChild
+ virtual void requestDestroyFromChild (const std::shared_ptr<Object> & _child);
setParent
+ virtual void setParent (const std::shared_ptr<Object> & _newParent);
removeParent
+ virtual void removeParent ();
getObjectType
+ const char* const getObjectType ();get the current Object type of the Object
Return: | the last type name of the element |
getTypeDescription
+ std::string getTypeDescription ();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 ();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 ();get the UniqueId of the Object
Return: | the requested ID |
parameterSetOnWidgetNamed
+ bool parameterSetOnWidgetNamed (const std::string & _objectName,
const std::string & _config,
const std::string & _value);
m_name
# ewol::object::Param<std::string> m_name;name of the element ...
getName
+ const std::string & getName () 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 () const;
Return: | the requested object manager. |
getContext
+ ewol::Context & getContext () const;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 () const;Get the resource status of the element.
Return: | the resource status. |
getObjectNamed
+ std::shared_ptr<ewol::Object> getObjectNamed (const std::string & _objectName) const;Retrive an object with his name (in the global list)
Parameter [input]: | _name | Name of the object |
Return: | the requested object or nullptr |
getSubObjectNamed
+ virtual std::shared_ptr<ewol::Object> getSubObjectNamed (const std::string & _objectName);Retrive an object with his name (in the global list)
Parameter [input]: | _name | Name of the object |
Return: | the requested object or nullptr |