ANNA Suite  2020b
Multipurpose development suite for Telco applications
LongBlock.hpp
Go to the documentation of this file.
1 // ANNA - Anna is Not Nothingness Anymore //
2 // //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
4 // //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7 
8 
9 #ifndef anna_dbms_LongBlock_hpp
10 #define anna_dbms_LongBlock_hpp
11 
12 #include <string>
13 
15 #include <anna/core/DataBlock.hpp>
16 
17 #include <anna/dbms/Data.hpp>
18 
19 namespace anna {
20 
21 namespace dbms {
22 
33 class LongBlock : public Data {
34 public:
39  explicit LongBlock(const bool isNulleable = false) :
41  a_value(true) {
42  Data::setBuffer((void*) NULL);
43  }
44 
49  LongBlock(const LongBlock& other) :
50  Data(other),
51  a_value(true) {
52  a_value = other.a_value;
53  }
54 
58  virtual ~LongBlock() {;}
59 
64  int getSize() const { return a_value.getSize(); }
65 
71  const anna::DataBlock& getValue() const { return a_value; }
72 
79 
85  LongBlock& operator = (const LongBlock& other) noexcept(false);
86 
92  LongBlock& operator = (const anna::DataBlock& value) noexcept(false);
93 
98  operator anna::DataBlock& () { return a_value; }
99 
104  operator const anna::DataBlock& () const { return a_value; }
105 
110  std::string asString() const ;
111 
112 protected:
114 
115  void do_clear() { a_value.clear(); }
116 };
117 
118 }
119 }
120 
121 #endif
122 
anna::DataBlock a_value
Definition: LongBlock.hpp:113
LongBlock(const bool isNulleable=false)
Definition: LongBlock.hpp:39
virtual ~LongBlock()
Definition: LongBlock.hpp:58
LongBlock & operator=(const LongBlock &other) noexcept(false)
void setBuffer(void *buffer)
Definition: Data.hpp:131
Definition: LongBlock.hpp:33
const anna::DataBlock & getValue() const
Definition: LongBlock.hpp:71
std::string asString() const
LongBlock(const LongBlock &other)
Definition: LongBlock.hpp:49
Definition: Data.hpp:29
Definition: Data.hpp:27
int getSize() const
Definition: DataBlock.hpp:78
void clear() noexcept(false)
Definition: DataBlock.hpp:240
anna::DataBlock & getValue()
Definition: LongBlock.hpp:78
Definition: app.hpp:12
void do_clear()
Definition: LongBlock.hpp:115
bool isNulleable() const
Definition: Data.hpp:68
Definition: DataBlock.hpp:24
int getSize() const
Definition: LongBlock.hpp:64