Add no-deprecated to warnings due to dynamic exceptions.
[anna.git] / source / dbms / LongBlock.cpp
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 #include <anna/core/functions.hpp>
10
11 #include <anna/dbms/LongBlock.hpp>
12
13 using namespace anna;
14
15 dbms::LongBlock& dbms::LongBlock::operator = (const dbms::LongBlock & other)
16 throw(RuntimeException) {
17   if(this == &other)
18     return *this;
19
20   if(other.isNull() == true) {
21     setNull(true);
22     return *this;
23   }
24
25   return operator= (other.a_value);
26 }
27
28 dbms::LongBlock& dbms::LongBlock::operator = (const anna::DataBlock & value)
29 throw(RuntimeException) {
30   a_value = value;
31   setNull(a_value.isEmpty());
32   return *this;
33 }
34
35 std::string dbms::LongBlock::asString() const
36 throw() {
37   std::string result("dbms::LongBlock { ");
38   result += dbms::Data::asString();
39   result += " | Size: ";
40
41   if(isNull())
42     result += "(null)";
43   else
44     result += functions::asString(a_value.getSize());
45
46   return result += " }";
47 }
48