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


getTypeDescription

+ std::string getTypeDescription ();
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 ();
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 ();
get the UniqueId of the Object


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


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 () const;


getContext

+ ewol::Context & getContext () const;
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 () const;
Get the resource status of the element.


getObjectNamed

+ std::shared_ptr<ewol::Object> getObjectNamed (const std::string & _objectName) const;
Retrive an object with his name (in the global list)


getSubObjectNamed

+ virtual std::shared_ptr<ewol::Object> getSubObjectNamed (const std::string & _objectName);
Retrive an object with his name (in the global list)