X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fcore%2Futil%2FComponent.hpp;h=6ac2e42782238c466fe140532f61993d5e6a64c3;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hp=1292da88bd7deb8f65b3823174cd1ec44f97b9ca;hpb=4e12ac57e93c052f716a6305ad8fc099c45899d1;p=anna.git diff --git a/include/anna/core/util/Component.hpp b/include/anna/core/util/Component.hpp index 1292da8..6ac2e42 100644 --- a/include/anna/core/util/Component.hpp +++ b/include/anna/core/util/Component.hpp @@ -1,37 +1,9 @@ -// ANNA - Anna is Not 'N' Anymore -// -// (c) Copyright 2005-2014 Eduardo Ramos Testillano & Francisco Ruiz Rayo -// -// https://bitbucket.org/testillano/anna -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: eduardo.ramos.testillano@gmail.com -// cisco.tierra@gmail.com +// ANNA - Anna is Not Nothingness Anymore // +// // +// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo // +// // +// See project site at http://redmine.teslayout.com/projects/anna-suite // +// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE // #ifndef anna_core_util_Component_hpp @@ -54,13 +26,7 @@ namespace anna { 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 (FILE_LOCATION); @@ -81,36 +47,34 @@ public: 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); }; }