Remove warnings
[anna.git] / include / anna / core / util / Variable.hpp
index 582bd83..3db7df1 100644 (file)
@@ -1,47 +1,19 @@
-// 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_Variable_hpp
 #define anna_core_util_Variable_hpp
 
-#include <anna/config/defines.hpp>
+#include <anna/core/util/defines.hpp>
 #include <anna/core/RuntimeException.hpp>
 #include <anna/core/define.autoenum.hpp>
 #include <anna/core/util/String.hpp>
-#include <anna/core//DataBlock.hpp>
+#include <anna/core/DataBlock.hpp>
 
 namespace anna {
 
@@ -109,7 +81,7 @@ public:
   * @param name Nombre logico que recibe este variable.
   * @param value Referencia a la variable que estamos recubriendo con esta instancia.
   */
-  Variable(const char* name, Integer64& value) :
+  Variable(const char* name, S64& value) :
     a_name(name),
     a_isNull(false),
     a_type(Type::Integer64),
@@ -241,7 +213,7 @@ public:
      @return Si la variable indicada en el contructor de esta instancia puede interpretarse como
      un entero de 64 bits devolvera su contenido, en otro caso lanzara una excepcion para indicar el error.
   */
-  Integer64 getInteger64Value() const throw(RuntimeException);
+  S64 getInteger64Value() const throw(RuntimeException);
 
   /**
      Devuelve el valor booleano asociado a esta variable.
@@ -307,7 +279,7 @@ public:
      Interpreta el valor asociado a esta variable como un valor entero largo.
      \warning No se realiza ninguna comprobacion semantica.
   */
-  Integer64 getInteger64() const throw() { return *a_value.a_longInteger; }
+  S64 getInteger64() const throw() { return *a_value.a_longInteger; }
 
   /**
      Interpreta el valor asociado a esta variable como un valor booleano.
@@ -368,7 +340,7 @@ public:
   *
   * @param value Valor que tomara la variable a la que recubre este variable.
   */
-  void setValue(const Integer64 value) throw(RuntimeException) ;
+  void setValue(const S64 value) throw(RuntimeException) ;
 
   /**
   * Establece el valor de la variable a la que recubre. Si la variable estaba marcada como nula la desmarca.
@@ -422,7 +394,7 @@ public:
      Establece el valor asociado a esta variable como un valor entero largo.
      \warning No se realiza ninguna comprobacion semantica.
   */
-  void setLong(const Integer64 value) throw() { *a_value.a_longInteger = value; a_isNull = false; }
+  void setLong(const S64 value) throw() { *a_value.a_longInteger = value; a_isNull = false; }
 
   /**
      Establece el valor asociado a esta variable como un valor booleano.
@@ -486,10 +458,14 @@ protected:
 
 private:
   std::string a_name;
+  bool a_isNull;
+  const Type::_v a_type;
+  const bool a_isOwner;
+
   union {
     std::string* a_string;
     int* a_integer;
-    Integer64* a_longInteger;
+    S64* a_longInteger;
     bool* a_boolean;
     DataBlock* a_dataBlock;
     float* a_float;
@@ -498,14 +474,11 @@ private:
   } a_value;
   struct {
     int integer;
-    Integer64 longInteger;
+    S64 longInteger;
     bool boolean;
     float theFloat;
     double theDouble;
   } a_aux;
-  const Type::_v a_type;
-  const bool a_isOwner;
-  bool a_isNull;
 
   Variable(const Variable&);
   Variable& operator = (const Variable&);