aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-07-23 14:41:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-07-23 14:41:08 +0200
commit32f1168489c12677fbb174c5119b5edd40309b79 (patch)
tree78ae277c47619adc256b3c76d7f0527f6227165a
parenta82a07719d3df95ea6b7a569b9ffd854e12d2554 (diff)
Add buffer interface
-rw-r--r--odb/buffer.hxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/odb/buffer.hxx b/odb/buffer.hxx
new file mode 100644
index 0000000..99482ae
--- /dev/null
+++ b/odb/buffer.hxx
@@ -0,0 +1,27 @@
+// file : odb/buffer.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BUFFER_HXX
+#define ODB_BUFFER_HXX
+
+#include <cstddef> // std::size_t
+
+namespace odb
+{
+ class buffer
+ {
+ public:
+ buffer ();
+
+ void
+ grow (std::size_t new_capacity, std::size_t data_size);
+
+ private:
+ char* data_;
+ std::size_t capacity_;
+ };
+}
+
+#endif // ODB_BUFFER_HXX