SQLiteXX  0.1.0
 All Classes Namespaces Files Functions Enumerations Enumerator
Blob.h
Go to the documentation of this file.
1 
3 #ifndef __SQLITEXX_SQLITE_BLOB_H__
4 #define __SQLITEXX_SQLITE_BLOB_H__
5 
6 #include <sqlite3.h>
7 
8 #include <cassert>
9 #include <cstring>
10 #include <memory>
11 #include <utility>
12 
13 
14 namespace sqlite
15 {
20  class blob
21  {
22  public:
27  blob(const void* data, const size_t size);
28 
33  blob(const blob& other);
34 
39  blob(blob&& other);
40 
46  blob& operator=(const blob& other);
47 
53  blob& operator=(blob&& other);
54 
58  const void* data() const;
59 
63  size_t size() const;
64 
65  private:
66  std::unique_ptr<char[]> m_data;
67  size_t m_size;
68  };
69 }
70 
71 
72 #endif
size_t size() const
Used to get the size of the contained 'blob'.
Definition: Blob.cpp:48
const void * data() const
The raw data of the blob's contents.
Definition: Blob.cpp:44
blob(const void *data, const size_t size)
Constructs a blob object with contents of data.
Definition: Blob.cpp:6
blob & operator=(const blob &other)
Copy assignment operator.
Definition: Blob.cpp:26
A "Binary Large OBject".
Definition: Blob.h:20