Remove dynamic exceptions
[anna.git] / include / anna / ldap / Search.hpp
index 153935a..5ea0047 100644 (file)
@@ -1,37 +1,9 @@
-// ANNA - Anna is Not Nothingness 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_ldap_Search_hpp
@@ -72,94 +44,94 @@ public:
      Devuelve el DN de la entrada en la que se comienza la busqueda.
      \return El DN de la entrada en la que se comienza la busqueda.
   */
-  const std::string& getBase() const throw() { return a_base; }
+  const std::string& getBase() const { return a_base; }
 
   /**
      Devuelve el ambito de la busqueda.
      \return El ambito de la busqueda.
   */
-  Scope::_v getScope() const throw() { return a_scope; }
+  Scope::_v getScope() const { return a_scope; }
 
   /**
      Devuelve el filtro aplicado a la busqueda.
      \return El filtro aplicado a la busqueda.
   */
-  const std::string& getFilter() const throw() { return a_filter; }
+  const std::string& getFilter() const { return a_filter; }
 
   /**
      Devuelve el indicador de tratamiento de busquedas.
      \return El indicador de tratamiento de busquedas.
   */
-  bool getOnlyType() const throw() { return a_onlyType; }
+  bool getOnlyType() const { return a_onlyType; }
 
   /**
      Devuelve el numero maximo de elementos devueltos como resultado de la consulta.
      \return El numero maximo de elementos devueltos como resultado de la consulta.
      \see clearSizeLimit.
   */
-  int getSizeLimit() const throw() { return a_sizeLimit; }
+  int getSizeLimit() const { return a_sizeLimit; }
 
   /**
      Establece el DN de la entrada en la que comenzar la busqueda.
      \param base DN de la entrada en la que comenzar la busqueda.
   */
-  void setBase(const std::string& base) throw() { a_base = base; }
+  void setBase(const std::string& base) { a_base = base; }
 
   /**
      Establece el ambito de la busqueda.
      \param scope Ambito de la busqueda.
   */
-  void setScope(const Scope::_v scope) throw() { a_scope = scope; }
+  void setScope(const Scope::_v scope) { a_scope = scope; }
 
   /**
      Establece el ambito de la busqueda.
      \param scope Texto que identifica el ambito de la busqueda. Si no se trata de un texto
      reconocido se devolvera una excepcion.
   */
-  void setScope(const char* scope) throw(RuntimeException) { a_scope = Scope::asEnumEx(scope); }
+  void setScope(const char* scope) noexcept(false) { a_scope = Scope::asEnumEx(scope); }
 
   /**
      Establece el filtro aplicado a la busqueda.
      \param filter Filtro aplicado a la busqueda.
      \see clearFilter
   */
-  void setFilter(const std::string& filter) throw() { a_filter = filter; }
+  void setFilter(const std::string& filter) { a_filter = filter; }
 
   /**
      Determina como se van a tratar los atributos.
      \param onlyType Un valor \em true indica que solo se requieren los tipos de atributos, un valor
      \em false indica que se requieren tipos y valores asociados a los atributos.
   */
-  void setOnlyType(const bool onlyType) throw() { a_onlyType = onlyType; }
+  void setOnlyType(const bool onlyType) { a_onlyType = onlyType; }
 
   /**
      Establece el numero maximo de elementos devueltos como resultado de la consulta.
      \param sizeLimit Numero de entradas retornadas por la busqueda.
      \see clearSizeLimit.
   */
-  void setSizeLimit(const int sizeLimit) throw() { a_sizeLimit = sizeLimit; }
+  void setSizeLimit(const int sizeLimit) { a_sizeLimit = sizeLimit; }
 
   /**
      Elimina el filtro asociado a esta consulta.
   */
-  void clearFilter() throw() { a_filter.clear(); }
+  void clearFilter() { a_filter.clear(); }
 
   /**
      Elimina el limite en cuanto al numero de elementos indicados en la consulta.
   */
-  void clearSizeLimit() throw() { a_sizeLimit = 0; }
+  void clearSizeLimit() { a_sizeLimit = 0; }
 
   /**
    * Elimina los atributos asociados a esta consulta.
    */
-  void clearAttributes() throw();
+  void clearAttributes() ;
 
   /**
      Incorpora un elemento a la lista de atributos que deseamos obtener de cada una de las entradas
      que cumplen el filtro establecido.
      Si esta lista esta vacia se devolvera la informacion de todos los atributos implicados.
   */
-  void addAttribute(const std::string& attribute) throw() {
+  void addAttribute(const std::string& attribute) {
     std::string* newString = st_attributes.create();
     *newString = attribute;
     a_attributes.push_back(newString);
@@ -168,45 +140,45 @@ public:
   /**
      Inicializa el contenido de esta clase.
   */
-  void clear() throw();
+  void clear() ;
 
   /**
      Devuelve un iterador que apunta el primer atributo contenido en la consulta.
      \return un iterador que apunta el primer atributo contenido en la consulta.
   */
-  const_attribute_iterator attribute_begin() const throw() { return a_attributes.begin(); }
+  const_attribute_iterator attribute_begin() const { return a_attributes.begin(); }
 
   /**
      Devuelve un iterador que apunta el ultimo atributo contenido en la consulta.
      \return un iterador que apunta el ultimo atributo contenido en la consulta.
   */
-  const_attribute_iterator attribute_end() const throw() { return a_attributes.end(); }
+  const_attribute_iterator attribute_end() const { return a_attributes.end(); }
 
   /**
      Devuelve el numero de atributos contenidos en la consulta.
      \return El numero de atributos contenidos en la consulta.
   */
-  int attribute_size() const throw() { return a_attributes.size(); }
+  int attribute_size() const { return a_attributes.size(); }
 
   /**
      Devuelve el atributo apuntado por el iterador recibido.
      \param ii Iterador con el que estamos recorriendo los atributos.
      \return El atributo apuntado por el iterador recibido.
   */
-  static const std::string& attribute(const_attribute_iterator ii) throw() { return **ii; }
+  static const std::string& attribute(const_attribute_iterator ii) { return **ii; }
 
   /**
      Devuelve una cadena con la informacion referente a este objeto.
      \return Una cadena con la informacion referente a este objeto.
   */
-  virtual std::string asString() const throw();
+  virtual std::string asString() const ;
 
   /**
      Devuelve un nodo XML con la informacion referente a este objeto.
      \param parent Nodo XML a partir del cual introducir la informacion.
      \return Un nodo XML con la informacion referente a este objeto.
   */
-  virtual xml::Node* asXML(xml::Node* parent) const throw();
+  virtual xml::Node* asXML(xml::Node* parent) const ;
 
 private:
   std::string a_base;
@@ -218,12 +190,12 @@ private:
 
   static attribute_pool st_attributes;
 
-  attribute_iterator attribute_begin() throw() { return a_attributes.begin(); }
-  attribute_iterator attribute_end() throw() { return a_attributes.end(); }
-  int attribute_size() throw() { return a_attributes.size(); }
-  static std::string& attribute(attribute_iterator ii) throw() { return **ii; }
+  attribute_iterator attribute_begin() { return a_attributes.begin(); }
+  attribute_iterator attribute_end() { return a_attributes.end(); }
+  int attribute_size() { return a_attributes.size(); }
+  static std::string& attribute(attribute_iterator ii) { return **ii; }
 
-  IdMessage send(Session&) const throw();
+  IdMessage send(Session&) const ;
 };
 
 }