text_format_factory< Metric > Struct Template Reference
#include <text_format_factory.h>
Public Types | |
typedef Metric | metric_type |
typedef abstract_text_format< metric_type > | abstract_text_format_t |
typedef Metric::header_type | header_type |
typedef stdbp::unique_ptr< abstract_text_format_t > | metric_format_pointer |
Public Member Functions | |
typedef | INTEROP_UNORDERED_MAP (int, metric_format_pointer) text_format_map |
abstract_text_format_t * | find (int version) |
void | add (abstract_text_format_t *pformat) |
size_t | size () const |
Static Public Member Functions | |
static text_format_factory< Metric > & | instance () |
Detailed Description
template<class Metric>
struct illumina::interop::io::text_format_factory< Metric >
Factory for generating text formats
This class defines static methods to register a metric format. The registered metric formats can be accessed through the instance()
static function.
- Note
- this is not thread safe
Member Typedef Documentation
Define the abstract format type
typedef Metric::header_type header_type |
Define the header type
Define a unique pointer to a metric format
typedef Metric metric_type |
Define the metric type
Member Function Documentation
|
inline |
Add a text format to the factory
- Parameters
-
pformat format to add
|
inline |
Find a format for a given version
If the format is not found, return null
- Parameters
-
version version to search for
- Returns
- pointer to format or null
|
inlinestatic |
Instance of the factory singleton
- Note
- this is not thread safe
- Returns
- instance to singleton
typedef INTEROP_UNORDERED_MAP | ( | int | , |
metric_format_pointer | |||
) |
Define a map between format version and the format
|
inline |
Get number of text formats
- Returns
- number of text formats
The documentation for this struct was generated from the following file:
- /io/interop/io/format/text_format_factory.h