TPIE

2362a60
external_store_base.h
1 // -*- mode: c++; tab-width: 4; indent-tabs-mode: t; eval: (progn (c-set-style "stroustrup") (c-set-offset 'innamespace 0)); -*-
2 // vi:set ts=4 sts=4 sw=4 noet :
3 // Copyright 2014 The TPIE development team
4 //
5 // This file is part of TPIE.
6 //
7 // TPIE is free software: you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License as published by the
9 // Free Software Foundation, either version 3 of the License, or (at your
10 // option) any later version.
11 //
12 // TPIE is distributed in the hope that it will be useful, but WITHOUT ANY
13 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with TPIE. If not, see <http://www.gnu.org/licenses/>
19 
20 #ifndef _TPIE_BTREE_EXTERNAL_STORE_BASE_H_
21 #define _TPIE_BTREE_EXTERNAL_STORE_BASE_H_
22 
23 #include <tpie/portability.h>
24 #include <tpie/btree/base.h>
25 #include <tpie/tpie_assert.h>
26 #include <tpie/blocks/block_collection_cache.h>
27 
28 #include <cstddef>
29 
30 namespace tpie {
31 namespace bbits {
32 
34 public:
35 
39  external_store_base(const std::string & path);
40 
41  external_store_base(external_store_base&& other) noexcept;
42 
44 
46  external_store_base& operator=(const external_store_base&) = delete;
47 
48 protected:
49  blocks::block_handle m_root;
50  std::string m_path;
51  size_t m_height;
52  size_t m_size;
53  bool m_moved;
54 };
55 
56 } //namespace bbits
57 } //namespace tpie
58 #endif /*_TPIE_BTREE_EXTERNAL_STORE_BASE_H_*/
Defines the tp_assert macro.
This file contains a few deprecated definitions for legacy code.
external_store_base(const std::string &path)
Construct a new empty btree storage.