4 #include "CoralBase/Blob.h"
8 #include <openssl/sha.h>
12 m_data( new coral::Blob(0) ){
16 m_data( new coral::Blob( size ) ){
21 m_data( new coral::Blob(data.
size()) ){
22 ::memcpy(
m_data->startingAddress(), data.startingAddress(), data.size() );
41 m_data.reset(
new coral::Blob( source.size() ) );
42 ::memcpy( m_data->startingAddress(), source.c_str(), source.size() );
46 if(!m_data.get())
throwException(
"Binary data can't be accessed.",
"Binary::data");
47 return m_data->startingAddress();
50 if(!m_data.get())
throwException(
"Binary data can't be accessed.",
"Binary::data");
51 return m_data->startingAddress();
55 if(!m_data.get())
throwException(
"Binary data can't be accessed.",
"Binary::size");
56 return m_data->size();
void throwException(const std::string &message, const std::string &methodName)
std::shared_ptr< coral::Blob > m_data
Binary & operator=(const Binary &rhs)
void copy(const std::string &source)
const void * data() const
char data[epos_bytes_allocation]
const coral::Blob & get() const
static std::string const source
tuple size
Write out results.