libebml_ng
prepared_fallocate_t.h
Go to the documentation of this file.
1 #ifndef EBML_NG_LAZYLOAD_PREPARED_FALLOCATE_H
2 #define EBML_NG_LAZYLOAD_PREPARED_FALLOCATE_H
3 
4 #include "extent_t.h"
5 #include "children_m.h"
6 
7 #ifdef __linux__
8  #include <fcntl.h>
9 
10  #ifndef HAS_FALLOCATE
11  #ifdef _GNU_SOURCE
12  #define HAS_FALLOCATE 1
13  #else
14  #define HAS_FALLOCATE 0
15  #endif
16  #endif
17 
18 #else
19  #define HAS_FALLOCATE 0
20 #endif
21 
22 namespace ebml {
23 #if HAS_FALLOCATE
24  class prepared_fallocate_t {
25  public:
26  extent_t prev;
27  off_t nextOld;
28  off_t nextNew;
29  children_m::iterator hint;
30 
31  prepared_fallocate_t();
32 
33  prepared_fallocate_t(const extent_t&, off_t, off_t);
34  prepared_fallocate_t(extent_t&&, off_t, off_t);
35  prepared_fallocate_t(const extent_t&, off_t, off_t, const children_m::iterator&);
36  prepared_fallocate_t(extent_t&&, off_t, off_t, const children_m::iterator&);
37  prepared_fallocate_t(const extent_t&, off_t, off_t, children_m::iterator&&);
38  prepared_fallocate_t(extent_t&&, off_t, off_t, children_m::iterator&&);
39  prepared_fallocate_t(const prepared_fallocate_t&) = default;
40  prepared_fallocate_t(prepared_fallocate_t&&) = default;
41 
42  prepared_fallocate_t& operator=(const prepared_fallocate_t&) = default;
43  prepared_fallocate_t& operator=(prepared_fallocate_t&&) = default;
44 
45  void throw_exc(const std::string&, const c_ebmlElement_sp&) const;
46  // operator ebmlInsertionError() const;
47  };
48 
49  extern template class status_t<prepared_fallocate_t>;
50 #endif
51 }
52 
53 #endif
Definition: basictypes.h:40
ptr< const ebmlElement > c_ebmlElement_sp
Definition: ptrs.h:843
uint16_t prev
Definition: contig-allocator.cpp:2