adtf_file_library  0.13.2
indexwritetable_v201_v301.h
Go to the documentation of this file.
1 
17 #ifndef INDEX_WRITE_TABLE_V201_V301_CLASS_HEADER
18 #define INDEX_WRITE_TABLE_V201_V301_CLASS_HEADER
19 
21 
22 #include <deque>
23 
24 namespace ifhd
25 {
26 namespace v201_v301
27 {
28 
33 {
34  private:
35  struct IndexTable
36  {
37  IndexTable():index_table_offset(0), index_count(0), last_index(0), index_offset(0) {}
38  uint32_t index_table_offset;
39  uint32_t index_count;
40  //the timestamp of the last index entry
41  timestamp_t last_index;
42  //the chunk position of the last index entry
43  uint64_t index_offset;
44  };
45 
46  struct MasterIndexTable: public std::deque<ChunkRef>, public IndexTable
47  {
48  };
49 
50  MasterIndexTable _master_index;
51 
52  struct StreamIndexTable: public std::deque<StreamRef>, public IndexTable
53  {
54  };
55 
56  StreamIndexTable _stream_index_tables[max_indexed_streams + 1];
58  timestamp_t _index_delay;
59 
60  public:
61 
66  void create(timestamp_t index_delay = 1000000);
67 
71  void free();
72 
77  uint16_t getMaxStreamId() const;
78 
84  size_t getItemCount(uint16_t stream_id) const;
85 
91  uint64_t getBufferSize(uint16_t stream_id) const;
92 
98  void copyToBuffer(uint16_t stream_id, void* buffer) const;
99 
112  void append(uint16_t stream_id,
113  uint64_t stream_index,
114  uint64_t chunk_index,
115  uint64_t file_pos,
116  uint32_t size,
117  timestamp_t time_stamp,
118  uint32_t flags,
119  bool& index_entry_appended);
120 
126  void remove(uint64_t chunk_index, uint16_t stream_id);
127 
133  uint64_t getIndexOffset(uint16_t stream_id) const;
134 
140  uint64_t getIndexTableOffset(uint16_t stream_id) const;
141 };
142 
143 } // namspace v400
144 } // namespace
145 #endif // _INDEX_WRITE_TABLE_V201_V301_CLASS_HEADER_
Definition: indexwritetable_v201_v301.h:33
void remove(uint64_t chunk_index, uint16_t stream_id)
void create(timestamp_t index_delay=1000000)
uint64_t getIndexTableOffset(uint16_t stream_id) const
void append(uint16_t stream_id, uint64_t stream_index, uint64_t chunk_index, uint64_t file_pos, uint32_t size, timestamp_t time_stamp, uint32_t flags, bool &index_entry_appended)
uint64_t getIndexOffset(uint16_t stream_id) const
size_t getItemCount(uint16_t stream_id) const
uint64_t getBufferSize(uint16_t stream_id) const
void copyToBuffer(uint16_t stream_id, void *buffer) const
namespace for IFHD File library
Definition: indexedfile_types.h:30

Copyright © CARIAD SE.
Generated on Mon Jun 10 2024 by doxygen 1.9.1
GIT Commit Hash: eb3af397a6b49ad6fcad9a60d8277d909b458b48