#include <metric_format.h>
Public Types | |
typedef Metric | metric_t |
typedef Metric::header_type | header_t |
typedef Layout::metric_id_t | metric_id_t |
typedef Layout::record_size_t | record_size_t |
Public Types inherited from abstract_metric_format< Metric > | |
typedef Metric | metric_t |
typedef Metric::header_type | header_t |
typedef metric_t::id_t | id_t |
Public Member Functions | |
void | write_metric_header (std::ostream &out, const header_t &header) |
void | write_metric (std::ostream &out, const metric_t &metric, const header_t &header) |
size_t | read_header (std::istream &in, model::metric_base::metric_set< Metric > &metric_set) |
void | read_metrics (std::istream &in, metric_set_t &metric_set, const size_t file_size) |
std::streamsize | read_header_impl (std::istream &in, header_t &header) |
size_t | buffer_size (const model::metric_base::metric_set< Metric > &metric_set) const |
size_t | record_size (const header_t &header) const |
size_t | header_size (const header_t &header) const |
::int16_t | version () const |
bool | is_multi_record () const |
bool | is_deprecated () const |
Public Member Functions inherited from abstract_metric_format< Metric > | |
virtual | ~abstract_metric_format () |
Detailed Description
template<class Metric, class Layout>
struct illumina::interop::io::metric_format< Metric, Layout >
Shared functionality for reading and writing binary InterOp metrics
This format assumes that the binary file as the following format:
- First byte is the version number
- Second byte is the record size
- Optional header
- A series of records (as defined by Layout)
Member Typedef Documentation
typedef Metric::header_type header_t |
Define the metric header type
typedef Layout::metric_id_t metric_id_t |
Define a layout ID type
typedef Metric metric_t |
Define the metric type
typedef Layout::record_size_t record_size_t |
Define the record size type
Member Function Documentation
|
inlinevirtual |
Calculate the size of a record
- Parameters
-
metric_set source set of metrics
- Returns
- size of buffer in bytes
Implements abstract_metric_format< Metric >.
|
inlinevirtual |
Calculate the size of a record
- Parameters
-
header metric set header
- Returns
- size of header in bytes
Implements abstract_metric_format< Metric >.
|
inlinevirtual |
Is the format no longer supported
- Returns
- true if this format is no longer supported
Implements abstract_metric_format< Metric >.
|
inlinevirtual |
Is the format a multi-record format
- Returns
- true if multiple records make up a single metric
Implements abstract_metric_format< Metric >.
|
inlinevirtual |
Read the header into a metric set
- Parameters
-
in input stream metric_set destination set of metrics
- Returns
- number of bytes read
Implements abstract_metric_format< Metric >.
|
inline |
Read a metric set from the given input stream
- Parameters
-
in input stream containing binary InterOp file data header metric set header
- Returns
- number of bytes in the record
|
inlinevirtual |
Read all the metrics into a metric set
- Parameters
-
in input stream metric_set destination set of metrics file_size size of the file
Implements abstract_metric_format< Metric >.
|
inlinevirtual |
Calculate the size of a record
- Parameters
-
header metric set header
- Returns
- size of record in bytes
Implements abstract_metric_format< Metric >.
|
inlinevirtual |
Get the version of this metric format
- Returns
- version number
Implements abstract_metric_format< Metric >.
|
inlinevirtual |
Write a metric record to the given output stream
- Parameters
-
out output stream metric a metric to write header metric set header
Implements abstract_metric_format< Metric >.
|
inlinevirtual |
Write the header of a metric InterOp to the given output stream
- Parameters
-
out output stream to write the binary InterOp file data header header of a metric set
Implements abstract_metric_format< Metric >.
The documentation for this struct was generated from the following file:
- /io/interop/io/format/metric_format.h