X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fxml%2FDocument.hpp;h=8a32b0a0194a783e6cdc8d6bb956e935fc689bd3;hb=f34b8069233e9e09208339bb79d8576c1ff962e1;hp=547f54e7e1a6ee354f962b2e70aecd849b1933c3;hpb=39033fd99e58e994a5e98c1060dcc79e0d81f9c9;p=anna.git diff --git a/include/anna/xml/Document.hpp b/include/anna/xml/Document.hpp index 547f54e..8a32b0a 100644 --- a/include/anna/xml/Document.hpp +++ b/include/anna/xml/Document.hpp @@ -1,37 +1,9 @@ -// ANNA - Anna is Not Nothingness Anymore -// -// (c) Copyright 2005-2014 Eduardo Ramos Testillano & Francisco Ruiz Rayo -// -// http://redmine.teslayout.com/projects/anna-suite -// -// 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 the copyright holder 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_xml_Document_hpp @@ -86,56 +58,56 @@ public: \param content Contenido de la Documento, depedendiendo del tipo de Documento hara referencia a un nombre de archivo, una URI o a una cadena. */ - void initialize(const char* content) throw(RuntimeException); + void initialize(const char* content) noexcept(false); /** Inicializa el contenido del documento XML. \param content Contenido del Documento XML. */ - void initialize(const DataBlock& content) throw(RuntimeException); + void initialize(const DataBlock& content) noexcept(false); /** * Obtiene el conjunto de caracteres usado en el documento XML. Puede ser NULL. * \return El conjunto de caracteres usado en el documento XML. */ - const char* getEncoding() const throw(); + const char* getEncoding() const ; /** * Obtiene la versión indicada en el documento XML.Puede ser NULL. * \return La versión indicada en el documento XML. */ - const char* getVersion() const throw(); + const char* getVersion() const ; /** Devuelve el contenido asociado al documento XML. \return El contenido asociado al documento XML. */ - virtual const DataBlock& getContent() const throw(RuntimeException) { return *this; } + virtual const DataBlock& getContent() const noexcept(false) { return *this; } /** Devuelve el contenido asociado al documento XML expresado como una cadena C. \return El contenido asociado al documento XML expresado como una cadena C. */ - const char* getContentAsCString() const throw(RuntimeException); + const char* getContentAsCString() const noexcept(false); /** * Establece el conjunto de caracteres usado en el documento XML. * \param encoding Literal que indica el conjunto de caracteres. Puede ser NULL. */ - void setEncoding(const char* encoding) throw(); + void setEncoding(const char* encoding) ; /** * Establece la versión usada en el documento XML. * \param encoding Literal que indica la versión. Puede ser NULL. */ - void setVersion(const char* version) throw(); + void setVersion(const char* version) ; /** * Analiza el contenido del documento XML y devuelve el nodo raíz. * \return El nodo raiz del arbol XML correspondiente al resultado del analisis. * \warning Este documento debe estar correctamente inicializado. */ - const xml::Node* parse() throw(RuntimeException); + const xml::Node* parse() noexcept(false); /** * Analiza el documento XML recibido como parametro, y verifica que cumpla las reglas @@ -144,7 +116,7 @@ public: * \return El nodo raiz del arbol XML correspondiente al resultado del analisis. * \warning Este documento debe estar correctamente inicializado. */ - const xml::Node* parse(const DTD& dtd) throw(RuntimeException); + const xml::Node* parse(const DTD& dtd) noexcept(false); protected: /** @@ -155,13 +127,13 @@ protected: /** * Libera la memoria asociada a los componentes de este documento. */ - void clear() throw(); + void clear() ; /* * Establece el contenido de este documento XML. * \param content Buffer que contiene una C-String con la que inciar este documento XML. */ - void setContent(const char* content) throw() { + void setContent(const char* content) { DataBlock::clear(); DataBlock::append(content, anna_strlen(content) + 1); a_contentIsCString = true; @@ -173,7 +145,7 @@ protected: * \param size Longitud del buffer. * \warning Sólo uso interno */ - void setContent(const char* content, const int size) throw() { + void setContent(const char* content, const int size) { DataBlock::clear(); DataBlock::append(content, size); a_contentIsCString = false; @@ -183,7 +155,7 @@ protected: * Establece el contenido de este documento XML. * \param content Bloque de datos del que copiar el valor para iniciar este documento XML. */ - void setContent(const DataBlock& content) throw() { + void setContent(const DataBlock& content) { DataBlock::operator= (content); a_contentIsCString = false; } @@ -198,8 +170,8 @@ private: Document(const Document&); - virtual _xmlDoc* do_initialize(const char* content) throw(RuntimeException) = 0; - virtual _xmlDoc* do_initialize(const DataBlock& content) throw(RuntimeException) = 0; + virtual _xmlDoc* do_initialize(const char* content) noexcept(false) = 0; + virtual _xmlDoc* do_initialize(const DataBlock& content) noexcept(false) = 0; friend class Parser; friend class XPath;