-// 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_core_util_DelayMeter_hpp
* \warning Elimina el punto de referencia temporal que puediera haberse establecido con #setTopReference.
* \return El número de milisegundos transcurridos desde la última vez que inicializamos la cuenta de temporizacion.
*/
- void setControlPoint() throw() {
+ void setControlPoint() {
a_timestamp = _TimeUnit::getTime();
clearTopReference();
}
*
* \param timestamp Valor de referencia a establecer.
*/
- void setControlPoint(const _TimeUnit& timestamp) throw() {
+ void setControlPoint(const _TimeUnit& timestamp) {
a_timestamp = timestamp;
clearTopReference();
}
* la marca de tiempo) y el núcleo y demás partes pueden tener conocimiento de que
* esa tarea ha sido finalidad.
*/
- void setTopReference(const _TimeUnit& topReference) throw() { a_topReference = topReference; }
+ void setTopReference(const _TimeUnit& topReference) { a_topReference = topReference; }
/**
* Elimina el punto de referencia temporal.
*/
- void clearTopReference() throw() { a_topReference = _TimeUnit(0); }
+ void clearTopReference() { a_topReference = _TimeUnit(0); }
/**
* Inicializa el valor del punto de referencia.
*/
- void clear() throw() { a_timestamp = 0; }
+ void clear() { a_timestamp = 0; }
/**
* Devuelve el número de milisegundos transcurridos desde la última vez que inicializamos la cuenta de temporización.
* \return El número de milisegundos transcurridos desde la última vez que inicializamos la cuenta de temporizacion.
* \warning Si detecta algun fallo devolvera 0.
*/
- _TimeUnit getValue() const throw() {
+ _TimeUnit getValue() const {
a_now = (a_topReference == _TimeUnit(0)) ? _TimeUnit::getTime() : a_topReference;
return (a_now > a_timestamp) ? (a_now - a_timestamp) : _TimeUnit(0);
}
* \return El número de milisegundos transcurridos desde la última vez que inicializamos la cuenta de temporizacion.
* \warning Si detecta algun fallo devolvera 0.
*/
- _TimeUnit getValue(const _TimeUnit& now) const throw() {
+ _TimeUnit getValue(const _TimeUnit& now) const {
return ((a_now = now) > a_timestamp) ? (a_now - a_timestamp) : _TimeUnit(0);
}
* Devuelve el tiempo que se usó como referencia al calcular el retardo en #getValue
* \return El tiempo que se usó como referencia al calcular el retardo en #getValue
*/
- const _TimeUnit& getNow() const throw() { return a_now; }
+ const _TimeUnit& getNow() const { return a_now; }
/**
* Operador copia.
* \param other Instancia de la que copiar.
*/
- DelayMeter& operator= (const DelayMeter& other) throw() { a_timestamp = other.a_timestamp; a_topReference = other.a_topReference; return *this; }
+ DelayMeter& operator= (const DelayMeter& other) { a_timestamp = other.a_timestamp; a_topReference = other.a_topReference; return *this; }
/**
* Compara el retardo acumulado por esta instancia con el valor recibido.
* \param left Valor numérico con el comparar.
* \return \em true si el retardo acumulado es mayor que el parámetro recibido o \em false en otro caso.
*/
- bool operator> (const _TimeUnit& left) const throw() { return getValue() > left; }
+ bool operator> (const _TimeUnit& left) const { return getValue() > left; }
/**
* Compara el retardo acumulado por esta instancia con el valor recibido.
* \param left Valor numérico con el comparar.
* \return \em true si el retardo acumulado es mayor que el parámetro recibido o \em false en otro caso.
*/
- bool operator< (const _TimeUnit& left) const throw() { return getValue() < left; }
+ bool operator< (const _TimeUnit& left) const { return getValue() < left; }
/**
* Devuelve la cadena que muestra el tiempo medido por esta instancia.
* \return la cadena que muestra el tiempo medido por esta instancia.
*/
- std::string asString() const throw() { return getValue().asString(); }
+ std::string asString() const { return getValue().asString(); }
/**
* Devuelve la cadena de depuración de esta instancia.
* \param whatis Texto con el nombre lógico de esta instancia.
* \return la cadena de depuración de esta instancia.
*/
- std::string asDebugString(const char* whatis) const throw() {
+ std::string asDebugString(const char* whatis) const {
std::string result(whatis);
result += " { TopReference: ";
result += a_topReference.asString();