projects
/
anna.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix xml to json converter
[anna.git]
/
source
/
core
/
DataBlock.cpp
diff --git
a/source/core/DataBlock.cpp
b/source/core/DataBlock.cpp
index
3e13027
..
4d69d59
100644
(file)
--- 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)
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),
a_buffer(NULL),
a_size(0),
a_deepCopy(deepCopy),
@@
-29,7
+29,7
@@
throw(RuntimeException) :
}
DataBlock::DataBlock(const DataBlock& other)
}
DataBlock::DataBlock(const DataBlock& other)
-
throw(RuntimeException
) :
+
noexcept(false
) :
a_buffer(NULL),
a_size(0),
a_deepCopy(other.a_deepCopy),
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)
}
void DataBlock::initialize(const char* buffer, const int size)
-
throw(RuntimeException
) {
+
noexcept(false
) {
if(a_deepCopy == false) {
a_buffer = const_cast <char*>(buffer);
a_size = size;
if(a_deepCopy == false) {
a_buffer = const_cast <char*>(buffer);
a_size = size;
@@
-59,7
+59,7
@@
throw(RuntimeException) {
}
void DataBlock::setSize(const int size)
}
void DataBlock::setSize(const int size)
-
throw(RuntimeException
) {
+
noexcept(false
) {
// if (size > a_maxSize) {
// string msg ("DataBlock::setSize | MaxSize: ");
// msg += functions::asString (a_maxSize);
// 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)
}
void DataBlock::allocate(const int nbytes)
-
throw(RuntimeException
) {
+
noexcept(false
) {
if(nbytes > a_size) {
if(a_maxSize == 0) {
if(a_deepCopy == 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)
}
void DataBlock::assign(const char* buffer, const int size)
-
throw(RuntimeException
) {
+
noexcept(false
) {
if(a_deepCopy == false) {
a_buffer = const_cast <char*>(buffer);
a_size = size;
if(a_deepCopy == false) {
a_buffer = const_cast <char*>(buffer);
a_size = size;
@@
-107,7
+107,7
@@
throw(RuntimeException) {
}
DataBlock& DataBlock::operator = (const DataBlock & right)
}
DataBlock& DataBlock::operator = (const DataBlock & right)
-
throw(RuntimeException
) {
+
noexcept(false
) {
if(this != &right) {
if(a_deepCopy) {
a_size = 0;
if(this != &right) {
if(a_deepCopy) {
a_size = 0;
@@
-122,7
+122,7
@@
throw(RuntimeException) {
}
const char DataBlock::operator [](const int pos) const
}
const char DataBlock::operator [](const int pos) const
-
throw(RuntimeException
) {
+
noexcept(false
) {
if(pos >= a_size) {
std::string msg("Position: ");
msg += functions::asString(pos);
if(pos >= a_size) {
std::string msg("Position: ");
msg += functions::asString(pos);
@@
-136,7
+136,7
@@
throw(RuntimeException) {
}
char& DataBlock::operator [](const int pos)
}
char& DataBlock::operator [](const int pos)
-
throw(RuntimeException
) {
+
noexcept(false
) {
if(pos >= a_size) {
std::string msg("Position: ");
msg += functions::asString(pos);
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)
}
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);
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)
}
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);
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)
}
void DataBlock::remove(const int nbytes)
-
throw(RuntimeException
) {
+
noexcept(false
) {
if(a_deepCopy == false)
throw RuntimeException("Deep copy not activated", ANNA_FILE_LOCATION);
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)
}
void DataBlock::extend(const int nbytes)
-
throw(RuntimeException
) {
+
noexcept(false
) {
if(a_deepCopy == false)
throw RuntimeException("Deep copy not activated", ANNA_FILE_LOCATION);
if(a_deepCopy == false)
throw RuntimeException("Deep copy not activated", ANNA_FILE_LOCATION);
@@
-230,8
+230,8
@@
throw(RuntimeException) {
}
std::string DataBlock::asString(const int characterByLine) const
}
std::string DataBlock::asString(const int characterByLine) const
-
throw()
{
- char aux [
8
];
+{
+ char aux [
16
];
std::string numbers;
std::string characters;
unsigned char c;
std::string numbers;
std::string characters;
unsigned char c;