-// 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_comm_ByRangeDelivery_hpp
delivery = new TDelivery(name.c_str(), false);
}
- std::string asString() const throw() {
+ std::string asString() const {
std::string result("comm::ByRangeDelivery { Bottom: ");
result += TSerializer::asString(bottom);
result += " | Top: ";
return result += " }";
}
- xml::Node* asXML(xml::Node* parent) const throw() {
+ xml::Node* asXML(xml::Node* parent) const {
xml::Node* result = parent->createChild("comm.Range");
result->createAttribute("Bottom", TSerializer::asString(bottom));
result->createAttribute("Top", TSerializer::asString(top));
\return La instancia del servicio de reparto asociado a este rango.
*/
range_iterator createRange(const TKey& bottom, const TKey& top)
- throw(RuntimeException) {
+ noexcept(false) {
Range* result;
if(bottom > top) {
\param ii Iterador de rango al que asociar el servicio. Debe ser resultado de invocar a #createRange.
\param server Instancia del comm::Server a incorporar dentro del rango.
*/
- void attach(range_iterator& ii, Server* server) throw(RuntimeException) {
+ void attach(range_iterator& ii, Server* server) noexcept(false) {
range(ii)->delivery->attach(server);
comm::Service::attach(server);
}
\param key Clave usada para calcular el reparto.
\warning Este metodo debe invocarse siempre antes de usar este servicio de reparto.
*/
- void prepare(const TKey& key) throw(RuntimeException) {
+ void prepare(const TKey& key) noexcept(false) {
Range* w = find(key);
if(w == NULL && Logger::isActive(Logger::Warning)) {
}
std::string asString() const
- throw() {
+ {
std::string result = className();
result += " { ";
result += comm::Delivery::asString();
}
xml::Node* asXML(xml::Node* parent) const
- throw() {
+ {
xml::Node* result = parent->createChild("anna.comm.ByRangeDelivery");
xml::Node* node = comm::Service::asXML(result);
a los que pertenece la clase.
\return Una cadena con el nombre de este selector.
*/
- static const char* className() throw() { return "anna::comm::ByRangeDelivery"; }
+ static const char* className() { return "anna::comm::ByRangeDelivery"; }
protected:
- range_iterator range_begin() throw() { return a_ranges.begin(); }
- range_iterator range_end() throw() { return a_ranges.end(); }
+ range_iterator range_begin() { return a_ranges.begin(); }
+ range_iterator range_end() { return a_ranges.end(); }
- const_range_iterator range_begin() const throw() { return a_ranges.begin(); }
- const_range_iterator range_end() const throw() { return a_ranges.end(); }
+ const_range_iterator range_begin() const { return a_ranges.begin(); }
+ const_range_iterator range_end() const { return a_ranges.end(); }
- static Range* range(range_iterator& ii) throw() { return *ii; }
- static const Range* range(const_range_iterator& ii) throw() { return *ii; }
+ static Range* range(range_iterator& ii) { return *ii; }
+ static const Range* range(const_range_iterator& ii) { return *ii; }
virtual void do_initialize()
- throw(RuntimeException) {
+ noexcept(false) {
for(range_iterator ii = range_begin(), maxii = range_end(); ii != maxii; ii ++)
range(ii)->delivery->initialize();
}
range_container a_ranges;
Range* a_currentRange;
- Range* find(const TKey& key) throw() {
+ Range* find(const TKey& key) {
Range* result(NULL);
Range* w;
}
comm::Resource* do_apply()
- throw(RuntimeException) {
+ noexcept(false) {
if(a_currentRange == NULL) {
std::string msg(asString());
msg += " | Wrong call to anna::comm::ByRangeDelivery::prepare";
// Considera que el servicio esta NO-disponible cuando TODOS los servicios fallan
bool do_fault(const comm::Resource* resource)
- throw() {
+ {
int n, nfault;
n = nfault = 0;
// Considera que el servicio esta recuperado cuando alguno de los servicios esta disponible
bool do_recover(const comm::Resource* resource)
- throw() {
+ {
bool result(false);
for(range_iterator ii = range_begin(), maxii = range_end(); ii != maxii; ii ++) {