X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Fdbms%2FShortBlock.cpp;fp=source%2Fdbms%2FShortBlock.cpp;h=0000000000000000000000000000000000000000;hb=a3b95648bd76140ef55e0b5941d423eee6c3856f;hp=a47de5f3cbe196a04e68ca76c9acaca8324e644c;hpb=94fc4366adedbf26ca6ef3104f88d41fa85f5a72;p=anna.git diff --git a/source/dbms/ShortBlock.cpp b/source/dbms/ShortBlock.cpp deleted file mode 100644 index a47de5f..0000000 --- a/source/dbms/ShortBlock.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// 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 // - - -#include - -#include - -using namespace anna; - -dbms::ShortBlock& dbms::ShortBlock::operator = (const dbms::ShortBlock & other) -throw(RuntimeException) { - if(this == &other) - return *this; - - if(other.isNull() == true) { - setNull(true); - return *this; - } - - return operator= (other.a_value); -} - -dbms::ShortBlock& dbms::ShortBlock::operator = (const anna::DataBlock & value) -throw(RuntimeException) { - if(value.getSize() > Data::getMaxSize()) { - throw RuntimeException( - functions::asString( - "Block out of range | Max: %d | Current: %d ", Data::getMaxSize(), value.getSize() - ), - ANNA_FILE_LOCATION - ); - } - - a_value = value; - setNull(a_value.isEmpty()); - return *this; -} - -std::string dbms::ShortBlock::asString() const -throw() { - std::string result("dbms::ShortBlock { "); - result += dbms::Data::asString(); - result += " | Value: "; - result += isNull() ? "(null)" : functions::asString(a_value).c_str(); - return result += " }"; -} -