abstract_metric_format< Metric > Struct Template Referenceabstract

#include <abstract_metric_format.h>

Inheritance diagram for abstract_metric_format< Metric >:
metric_format< Metric, Layout >

Public Types

typedef Metric metric_t
 
typedef Metric::header_type header_t
 
typedef metric_t::id_t id_t
 

Public Member Functions

virtual ~abstract_metric_format ()
 
virtual size_t header_size (const header_t &header) const =0
 
virtual size_t record_size (const header_t &header) const =0
 
virtual size_t buffer_size (const model::metric_base::metric_set< Metric > &metric_set) const =0
 
virtual void read_metrics (std::istream &in, model::metric_base::metric_set< Metric > &metric_set, const size_t file_size)=0
 
virtual size_t read_header (std::istream &in, model::metric_base::metric_set< Metric > &metric_set)=0
 
virtual void write_metric (std::ostream &out, const metric_t &metric, const header_t &header)=0
 
virtual void write_metric_header (std::ostream &out, const header_t &header)=0
 
virtual ::int16_t version () const =0
 
virtual bool is_multi_record () const =0
 
virtual bool is_deprecated () const =0
 

Detailed Description

template<class Metric>
struct illumina::interop::io::abstract_metric_format< Metric >

Abstract class that provides an interface for the format of a metric

The template argument for this class corresponds to a specific type of metric set.

Member Typedef Documentation

typedef Metric::header_type header_t

Define the metric header type

typedef metric_t::id_t id_t

ID type

typedef Metric metric_t

Define the metric type

Constructor & Destructor Documentation

virtual ~abstract_metric_format ( )
inlinevirtual

Destructor

Member Function Documentation

virtual size_t buffer_size ( const model::metric_base::metric_set< Metric > &  metric_set) const
pure virtual

Calculate the size of a record

Parameters
metric_setsource set of metrics
Returns
size of buffer in bytes

Implemented in metric_format< Metric, Layout >.

virtual size_t header_size ( const header_t header) const
pure virtual

Calculate the size of the file header

Parameters
headermetric set header
Returns
size of header in bytes

Implemented in metric_format< Metric, Layout >.

virtual bool is_deprecated ( ) const
pure virtual

Is the format no longer supported

Returns
true if this format is no longer supported

Implemented in metric_format< Metric, Layout >.

virtual bool is_multi_record ( ) const
pure virtual

Is the format a multi-record format

Returns
true if multiple records make up a single metric

Implemented in metric_format< Metric, Layout >.

virtual size_t read_header ( std::istream &  in,
model::metric_base::metric_set< Metric > &  metric_set 
)
pure virtual

Read only the header of a metric set

Parameters
ininput stream
metric_setdestination set of metrics
Returns
number of bytes read

Implemented in metric_format< Metric, Layout >.

virtual void read_metrics ( std::istream &  in,
model::metric_base::metric_set< Metric > &  metric_set,
const size_t  file_size 
)
pure virtual

Read all the metrics into a metric set

Parameters
ininput stream
metric_setdestination set of metrics
file_sizenumber of bytes in the file

Implemented in metric_format< Metric, Layout >.

virtual size_t record_size ( const header_t header) const
pure virtual

Calculate the size of a record

Parameters
headermetric set header
Returns
size of record in bytes

Implemented in metric_format< Metric, Layout >.

virtual ::int16_t version ( ) const
pure virtual

Version of the binary InterOp file format

Returns
version number

Implemented in metric_format< Metric, Layout >.

virtual void write_metric ( std::ostream &  out,
const metric_t metric,
const header_t header 
)
pure virtual

Write a metric record to the given output stream

Parameters
outoutput stream to write the binary InterOp file data
metricinterop metric data to write
headerinterop metric header data to write

Implemented in metric_format< Metric, Layout >.

virtual void write_metric_header ( std::ostream &  out,
const header_t header 
)
pure virtual

Write the header for a set of metric records to the given output stream

Parameters
outoutput stream to write the binary InterOp file data
headerheader of a metric set

Implemented in metric_format< Metric, Layout >.


The documentation for this struct was generated from the following file: