Tag
Tag
Template for tag definition.
Tag<T>
Include Headers
seqan/basic.h
Parameters

T | Any parameter less types.

Remarks
This struct is defined such that parameter less tags are easier recognizeable. This is best explained with the example below.
Metafunctions

Find | A metafunction to retrieve the index of a tag in the TagList.

Functions

getFileFormatExtensions | Returns file format extensions given a format tag.

Examples
Usually, tags are defined in the following way.
struct SomeTag_;
typedef Tag<SomeTag_> SomeTag;
They are then used as follows.
template <typename T>
void f(T const & x, SomeTag const & tag)
{
// ...
}
// Somewhere else:
f(3, SomeTag());
This has the advantages that (1) the type of tag parameters is printed as Tag<SomeTag_> in compiler error traces. Furthermore, (2) parameter less tags can be defined redundantly in multiple headers and we can still instantiate them anywhere where they are declared. The latter (2) cannot be achieved with only forward declaration (struct SomeTag;) or full declarations (struct SomeTag {};) everywhere.
SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2014/10/13 16:13:00