metric_format.h
Go to the documentation of this file.
100 const size_t record_count = static_cast<size_t>((file_size-header_size(metric_set))/record_size);
164 INTEROP_THROW(incomplete_file_exception, "Insufficient extended header data read from the file");
166 if (stream_position_pre_record_check != stream_position_post_record_check && record_size != layout_size)
232 size_t buffer_size(const model::metric_base::metric_set<Metric>& metric_set, is_single_record_t)const
236 size_t buffer_size(const model::metric_base::metric_set<Metric>& metric_set, is_multi_record_t)const
257 static bool test_stream(const char*, const offset_map_t&, const std::streamsize, const std::streamsize)
271 // TODO: Refactor tile metrics to move record type into layout id, then we can remove skip_metric,
::int16_t version() const
Definition: metric_format.h:208
Definition: metric_set.h:40
metric_t::id_t id_t
Definition: abstract_metric_format.h:31
Definition: enum_description.h:15
Metric::header_type header_t
Definition: metric_format.h:41
Definition: abstract_metric_format.h:24
void trim(const size_t n)
Definition: metric_set.h:258
size_t buffer_size(const model::metric_base::metric_set< Metric > &metric_set) const
Definition: metric_format.h:179
size_t size() const
Definition: metric_set.h:519
std::streamsize read_header_impl(std::istream &in, header_t &header)
Definition: metric_format.h:136
Definition: metric_format.h:31
std::map< id_t, size_t > offset_map_t
Definition: metric_set.h:70
Definition: type_traits.h:161
Layout::record_size_t record_size_t
Definition: metric_format.h:45
void write_binary(std::ostream &out, const T *buffer, const size_t n)
Definition: stream_util.h:158
Layout::metric_id_t metric_id_t
Definition: metric_format.h:43
void read_metrics(std::istream &in, metric_set_t &metric_set, const size_t file_size)
Definition: metric_format.h:93
size_t header_size(const header_t &header) const
Definition: metric_format.h:199
void write_metric(std::ostream &out, const metric_t &metric, const header_t &header)
Definition: metric_format.h:66
void write_metric_header(std::ostream &out, const header_t &header)
Definition: metric_format.h:52
size_t record_size(const header_t &header) const
Definition: metric_format.h:189
std::streamsize read_binary_with_count(std::istream &in, T &buffer)
Definition: stream_util.h:76
offset_map_t & offset_map()
Definition: metric_set.h:580
Definition: stream_exceptions.h:59
void resize(const size_t n)
Definition: metric_set.h:242
Definition: stream_exceptions.h:73
bool is_multi_record() const
Definition: metric_format.h:216
size_t read_header(std::istream &in, model::metric_base::metric_set< Metric > &metric_set)
Definition: metric_format.h:79
size_t compute_buffer_size(const MetricSet &metrics) INTEROP_THROW_SPEC((io
Definition: metric_file_stream.h:32
::int64_t file_size(const std::string &path)
Definition: filesystem.cpp:156
bool is_deprecated() const
Definition: metric_format.h:224