27 #ifndef __stir_IO_InputStreamWithRecordsFromHDF5_H__ 28 #define __stir_IO_InputStreamWithRecordsFromHDF5_H__ 33 #include "boost/shared_array.hpp" 73 template <
class RecordT>
77 typedef std::vector<std::streampos>::size_type SavedPosition;
87 const std::size_t size_of_record_signature,
88 const std::size_t max_size_of_record);
92 inline virtual Succeeded get_next_record(RecordT& record);
103 inline SavedPosition save_get_position();
106 inline Succeeded set_get_position(
const SavedPosition&);
113 inline std::vector<std::streampos> get_saved_get_positions()
const;
120 inline void set_saved_get_positions(
const std::vector<std::streampos>&);
123 shared_ptr<GEHDF5Wrapper> input_sptr;
125 boost::shared_array<char> data_sptr;
127 uint64_t m_list_size = 0;
129 std::streampos starting_stream_position;
130 mutable std::streampos current_offset;
131 std::vector<std::streampos> saved_get_positions;
133 const std::string m_filename;
134 const std::size_t size_of_record_signature;
135 const std::size_t max_size_of_record;
138 void read_data(
char* output,
const std::streampos offset,
const hsize_t size)
const;
141 boost::shared_array<char> buffer;
142 std::size_t max_buffer_size;
144 mutable std::size_t buffer_size;
145 mutable std::streampos start_of_buffer_offset;
146 void fill_buffer(
const std::streampos offset)
const;
Declaration of class stir::Succeeded.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
Succeeded read_data(IStreamT &s, Array< num_dimensions, elemT > &data, const ByteOrder byte_order=ByteOrder::native)
Read the data of an Array from file.
Definition: read_data.inl:63
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Declaration of class stir::GE::RDF_HDF5::GEHDF5Wrapper.