Component parent class
It must be only one instance for each component, but we can't inherit them from anna::Singleton because the
- programmer must have the posibility to re-implement the component. The main difference regarding anna components
- is that anna component are not associated to the application, allowing to be used on non-anna applications
- (instead of anna application, component is got internally through a singleton anna::ComponentManager).
- In this way, some anna libraries could build resources based on this, allowing its use by many kind of projects.
-
- ANNA components excludes concept of predecessor component and start/stop procedures, because complete use of
- components must be done over pure-anna applications with its anna::app::componet resources.
+ programmer must have the posibility to re-implement the component.
\code
Class* object = anna::functions::component <Class> (FILE_LOCATION);
Gets the class name configured at constructor.
\return The class name configured at constructor.
*/
- const char* getClassName() const throw() { return a_className.c_str(); }
+ const char* getClassName() const { return a_className.c_str(); }
/**
* Class string representation
*
* @return String with class content
*/
- virtual std::string asString(void) const throw();
+ virtual std::string asString(void) const ;
/**
Class XML representation.
\param parent XML node over which we will put instance information.
\return XML documentcon with class content.
*/
- virtual anna::xml::Node* asXML(anna::xml::Node* parent) const throw();
+ virtual anna::xml::Node* asXML(anna::xml::Node* parent) const ;
protected:
+ const std::string a_className;
+
/**
Contructor.
@param className Logical name for tha class.
*/
explicit Component(const char* className);
-private:
-
- const std::string a_className;
-
- //Component (const Component& other);
+ Component (const Component& other);
};
}