ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Member Functions | List of all members
anna::dbms::Integer Class Reference

#include <Integer.hpp>

Inheritance diagram for anna::dbms::Integer:
Inheritance graph
[legend]
Collaboration diagram for anna::dbms::Integer:
Collaboration graph
[legend]

Public Member Functions

 Integer (const bool isNulleable=false)
 
 Integer (const Integer &other)
 
int getValue () const
 
Integeroperator= (const int i)
 
Integeroperator= (const Integer &other)
 
 operator int () const
 
std::string asString () const
 
- Public Member Functions inherited from anna::dbms::Data
int getMaxSize () const
 
Type::_v getType () const
 
void * getBuffer ()
 
bool isNull () const
 
bool isNulleable () const
 
void setNull (const bool isNull)
 
void clear ()
 

Additional Inherited Members

- Protected Member Functions inherited from anna::dbms::Data
 Data (const Type::_v type, const int maxSize, const bool isNulleable)
 
 Data (const Data &other)
 
void setBuffer (void *buffer)
 

Detailed Description

Cadena usada como entrada y/o salida de las sentencias SQL.

Constructor & Destructor Documentation

◆ Integer() [1/2]

anna::dbms::Integer::Integer ( const bool  isNulleable = false)
inlineexplicit

Constructor.

Parameters
isNulleableIndica si el dato puede tomar valores nulos
27  :
28  Data(Type::Integer, sizeof(int), isNulleable),
29  a_value(0) {
30  Data::setBuffer(&a_value);
31  }
Data(const Type::_v type, const int maxSize, const bool isNulleable)
Definition: Data.hpp:107
void setBuffer(void *buffer)
Definition: Data.hpp:131
Definition: Data.hpp:31
bool isNulleable() const
Definition: Data.hpp:68
Here is the call graph for this function:

◆ Integer() [2/2]

anna::dbms::Integer::Integer ( const Integer other)
inline

Constructor copia.

Parameters
otherInstancia de la que copiar.
37  :
38  Data(other),
39  a_value(other.a_value) {
40  Data::setBuffer(&a_value);
41  }
Data(const Type::_v type, const int maxSize, const bool isNulleable)
Definition: Data.hpp:107
void setBuffer(void *buffer)
Definition: Data.hpp:131
Here is the call graph for this function:

Member Function Documentation

◆ asString()

std::string anna::dbms::Integer::asString ( ) const
virtual

Devuelve una cadena con la informacion referente a esta instancia.

Returns
Una cadena con la informacion referente a esta instancia.

Reimplemented from anna::dbms::Data.

◆ getValue()

int anna::dbms::Integer::getValue ( ) const
inline

Devuelve el valor entero asociado a esta instancia.

Returns
El valor entero asociado a esta instancia.
47 { return a_value; }

◆ operator int()

anna::dbms::Integer::operator int ( ) const
inline

Operador de conversion.

Returns
El valor entero asociado a esta instancia.
80 { return a_value; }
Here is the call graph for this function:

◆ operator=() [1/2]

Integer& anna::dbms::Integer::operator= ( const int  i)
inline

Operador de asignacin entero.

Parameters
iValor entero a asignar.
Returns
La referencia a esta instancia.
55  {
56  a_value = i;
57  Data::setNull(false);
58  return *this;
59  }
void setNull(const bool isNull)
Definition: Data.hpp:76
Here is the call graph for this function:

◆ operator=() [2/2]

Integer& anna::dbms::Integer::operator= ( const Integer other)
inline

Operador copia.

Parameters
otherInstancia de la que copiar.
Returns
La referencia a esta instancia.
67  {
68  if(this != &other) {
69  setNull(other.isNull());
70  a_value = other.a_value;
71  }
72 
73  return *this;
74  }
void setNull(const bool isNull)
Definition: Data.hpp:76
Here is the call graph for this function:

The documentation for this class was generated from the following file: