X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Fcore%2FDataBlock.cpp;fp=source%2Fcore%2FDataBlock.cpp;h=4d69d59a96748a9fdd0f5fda5c17876a2520858d;hp=38700a2f986f8f8739909da6e63aa785dffc52c8;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/source/core/DataBlock.cpp b/source/core/DataBlock.cpp index 38700a2..4d69d59 100644 --- a/source/core/DataBlock.cpp +++ b/source/core/DataBlock.cpp @@ -20,7 +20,7 @@ using namespace anna; if ((a_size + (a)) >= a_maxSize) extend ((a)); DataBlock::DataBlock(const char* buffer, const int size, const bool deepCopy) -throw(RuntimeException) : +noexcept(false) : a_buffer(NULL), a_size(0), a_deepCopy(deepCopy), @@ -29,7 +29,7 @@ throw(RuntimeException) : } DataBlock::DataBlock(const DataBlock& other) -throw(RuntimeException) : +noexcept(false) : a_buffer(NULL), a_size(0), a_deepCopy(other.a_deepCopy), @@ -43,7 +43,7 @@ DataBlock::~DataBlock() { } void DataBlock::initialize(const char* buffer, const int size) -throw(RuntimeException) { +noexcept(false) { if(a_deepCopy == false) { a_buffer = const_cast (buffer); a_size = size; @@ -59,7 +59,7 @@ throw(RuntimeException) { } void DataBlock::setSize(const int size) -throw(RuntimeException) { +noexcept(false) { // if (size > a_maxSize) { // string msg ("DataBlock::setSize | MaxSize: "); // msg += functions::asString (a_maxSize); @@ -79,7 +79,7 @@ throw(RuntimeException) { } void DataBlock::allocate(const int nbytes) -throw(RuntimeException) { +noexcept(false) { if(nbytes > a_size) { if(a_maxSize == 0) { if(a_deepCopy == false) @@ -95,7 +95,7 @@ throw(RuntimeException) { } void DataBlock::assign(const char* buffer, const int size) -throw(RuntimeException) { +noexcept(false) { if(a_deepCopy == false) { a_buffer = const_cast (buffer); a_size = size; @@ -107,7 +107,7 @@ throw(RuntimeException) { } DataBlock& DataBlock::operator = (const DataBlock & right) -throw(RuntimeException) { +noexcept(false) { if(this != &right) { if(a_deepCopy) { a_size = 0; @@ -122,7 +122,7 @@ throw(RuntimeException) { } const char DataBlock::operator [](const int pos) const -throw(RuntimeException) { +noexcept(false) { if(pos >= a_size) { std::string msg("Position: "); msg += functions::asString(pos); @@ -136,7 +136,7 @@ throw(RuntimeException) { } char& DataBlock::operator [](const int pos) -throw(RuntimeException) { +noexcept(false) { if(pos >= a_size) { std::string msg("Position: "); msg += functions::asString(pos); @@ -151,7 +151,7 @@ throw(RuntimeException) { } void DataBlock::append(const char* data, const int len) -throw(RuntimeException) { +noexcept(false) { if(a_buffer == data && data != NULL && len > 0) throw RuntimeException("Can not append myself", ANNA_FILE_LOCATION); @@ -170,7 +170,7 @@ throw(RuntimeException) { } void DataBlock::remove(const int pos, const int nbytes) -throw(RuntimeException) { +noexcept(false) { if(a_deepCopy == false) throw RuntimeException("Deep copy not activated", ANNA_FILE_LOCATION); @@ -189,7 +189,7 @@ throw(RuntimeException) { } void DataBlock::remove(const int nbytes) -throw(RuntimeException) { +noexcept(false) { if(a_deepCopy == false) throw RuntimeException("Deep copy not activated", ANNA_FILE_LOCATION); @@ -208,7 +208,7 @@ throw(RuntimeException) { } void DataBlock::extend(const int nbytes) -throw(RuntimeException) { +noexcept(false) { if(a_deepCopy == false) throw RuntimeException("Deep copy not activated", ANNA_FILE_LOCATION); @@ -230,7 +230,7 @@ throw(RuntimeException) { } std::string DataBlock::asString(const int characterByLine) const -throw() { +{ char aux [16]; std::string numbers; std::string characters;