diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-18 18:26:33 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-18 18:26:33 +0200 |
commit | dce5d0658e67ced4d5fa64f98f598b86917927a7 (patch) | |
tree | e910d86848a672ef4d0e3977d351e21d3f633227 /odb/buffer.hxx | |
parent | 854af2dbb1ee01f6e1c8d4f8f513ff2bad7da4f0 (diff) |
Move buffer to the details namespace
Diffstat (limited to 'odb/buffer.hxx')
-rw-r--r-- | odb/buffer.hxx | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/odb/buffer.hxx b/odb/buffer.hxx deleted file mode 100644 index 4f4ce0b..0000000 --- a/odb/buffer.hxx +++ /dev/null @@ -1,56 +0,0 @@ -// 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 <new> -#include <cstddef> // std::size_t - -namespace odb -{ - class buffer - { - public: - ~buffer () - { - if (data_) - operator delete (data_); - } - - buffer () - : capacity_ (512) - { - data_ = static_cast<char*> (operator new (capacity_)); - } - - char* - data () - { - return data_; - } - - const char* - data () const - { - return data_; - } - - std::size_t - capacity () const - { - return capacity_; - } - - void - capacity (std::size_t, std::size_t data_size = 0); - - private: - char* data_; - std::size_t capacity_; - }; -} - -#endif // ODB_BUFFER_HXX |