metric_file_stream.h
Go to the documentation of this file.
32 size_t compute_buffer_size(const MetricSet& metrics) INTEROP_THROW_SPEC((io::invalid_argument, io::bad_format_exception))
44 size_t write_interop_to_buffer(const MetricSet& metrics, ::uint8_t* buffer, const size_t buffer_size)
45 INTEROP_THROW_SPEC((io::invalid_argument, io::bad_format_exception, io::incomplete_file_exception, io::format_exception))
51 INTEROP_THROW(invalid_argument, "Buffer size too small: " << buffer_size << " < " << str.length());
66 void read_interop_from_buffer(::uint8_t* buffer, const size_t buffer_size, MetricSet& metrics) INTEROP_THROW_SPEC(
72 detail::membuf sbuf(reinterpret_cast<char*>(buffer), reinterpret_cast<char*>(buffer) + buffer_size);
86 void read_interop_from_string(const std::string& buffer, MetricSet& metrics, const bool rebuild=true) INTEROP_THROW_SPEC(
123 size_t read_header_from_string(const std::string& buffer, MetricSet& metrics) INTEROP_THROW_SPEC(
140 void write_header_to_string(std::string& buffer, const MetricSet& metrics, ::int16_t version=-1) INTEROP_THROW_SPEC(
165 void read_interop(const std::string& run_directory, MetricSet& metrics, const bool use_out=true) INTEROP_THROW_SPEC(
172 // ---------------------------------------------------------------------------------------------------------
178 // ---------------------------------------------------------------------------------------------------------
351 bool interop_exists(const std::string& run_directory, MetricSet&, const size_t last_cycle, const bool use_out=true)
Definition: enum_description.h:15
Definition: stream_exceptions.h:86
Definition: stream_membuf.h:27
void write_metric_header(std::ostream &out, const ::int16_t version, const typename MetricType::header_type &header=typename MetricType::header_type())
Definition: metric_stream.h:287
size_t read_header_from_string(const std::string &buffer, MetricSet &metrics) INTEROP_THROW_SPEC((interop
Definition: metric_file_stream.h:123
Definition: metric_format_factory.h:48
Definition: stream_exceptions.h:45
void write_interop_to_string(std::string &buffer, const MetricSet &metrics, const ::int16_t version=-1) INTEROP_THROW_SPEC((interop
Definition: metric_file_stream.h:104
void read_interop(const std::string &run_directory, MetricSet &metrics, const bool use_out=true) INTEROP_THROW_SPEC((io
Definition: metric_file_stream.h:165
size_t write_interop_to_buffer(const MetricSet &metrics,::uint8_t *buffer, const size_t buffer_size)
Definition: metric_file_stream.h:44
bool is_deprecated_set(MetricSet &metrics)
Definition: metric_file_stream.h:392
bool interop_exists(const std::string &run_directory, MetricSet &, const bool use_out=true) INTEROP_THROW_SPEC((io
Definition: metric_file_stream.h:251
void read_interop_by_cycle(const std::string &run_directory, MetricSet &metrics, const size_t last_cycle, const bool use_out=true) INTEROP_THROW_SPEC((interop
Definition: metric_file_stream.h:309
void write_header_to_string(std::string &buffer, const MetricSet &metrics,::int16_t version=-1) INTEROP_THROW_SPEC((interop
Definition: metric_file_stream.h:140
bool write_interop(const std::string &run_directory, const MetricSet &metrics, const bool use_out=true, const ::int16_t version=-1) INTEROP_THROW_SPEC((io
Definition: metric_file_stream.h:203
Definition: stream_exceptions.h:27
Definition: stream_exceptions.h:59
Definition: stream_exceptions.h:73
Definition: metric_exceptions.h:25
void list_interop_filenames(std::vector< std::string > &files, const std::string &run_directory, const size_t last_cycle=0, const bool use_out=true, const bool add=false)
Definition: metric_file_stream.h:275
void read_interop_from_string(const std::string &buffer, MetricSet &metrics, const bool rebuild=true) INTEROP_THROW_SPEC((interop
Definition: metric_file_stream.h:86
bool is_deprecated(const int version)
Definition: metric_file_stream.h:375
size_t compute_buffer_size(const MetricSet &metrics) INTEROP_THROW_SPEC((io
Definition: metric_file_stream.h:32
size_t size_of_buffer(const MetricSet &metric_set,::int16_t version=-1)
Definition: metric_stream.h:202
void write_interop_header(const std::string &run_directory, const ::int16_t version=-1, const typename MetricType::header_type &header=typename MetricType::header_type(), const bool use_out=true) INTEROP_THROW_SPEC((io
Definition: metric_file_stream.h:229
::int64_t file_size(const std::string &path)
Definition: filesystem.cpp:156
void read_interop_from_buffer(::uint8_t *buffer, const size_t buffer_size, MetricSet &metrics) INTEROP_THROW_SPEC((interop
Definition: metric_file_stream.h:66
void read_metrics(std::istream &in, MetricSet &metrics, const size_t file_size, const bool rebuild=true)
Definition: metric_stream.h:99
size_t read_header(std::istream &in, MetricSet &metrics)
Definition: metric_stream.h:73