SH::TagList Class Reference

A class that manages a list of tags for identifying samples. More...

#include <TagList.h>

List of all members.

Public Types

typedef std::set< std::string >
::const_iterator 
iterator
 the iterator to use

Public Member Functions

void testInvariant () const
 test the invariant of this object
 TagList ()
 standard default constructor
 TagList (const std::string &tags, char separator= ':')
 create a tag-list from a string
bool has (const std::string &tag) const
 whether we have the given tag
iterator begin () const
 the begin iterator to use
iterator end () const
 the end iterator to use
std::string join (char separator= ':') const
 join all the tags together into a string
void add (const std::string &tag)
 add a tag to the list

Detailed Description

A class that manages a list of tags for identifying samples.

The idea is to use the marker to group samples according to their type. This is a bit of an old mechanism, and personally I prefer to rely on meta-data instead.


Constructor & Destructor Documentation

SH::TagList::TagList (  ) 

standard default constructor

Guarantee
strong
Failures
out of memory I
SH::TagList::TagList ( const std::string &  tags,
char  separator = ':' 
) [explicit]

create a tag-list from a string

param tags the given list of tags param separator the character by which tags are separated in the list

Guarantee
strong
Failures
out of memory II

Member Function Documentation

void SH::TagList::add ( const std::string &  tag  ) 

add a tag to the list

Parameters:
tag the tag to add
Guarantee
strong
Failures
out of memory II
TagList::iterator SH::TagList::begin (  )  const

the begin iterator to use

Guarantee
no-fail
TagList::iterator SH::TagList::end (  )  const

the end iterator to use

Guarantee
no-fail
bool SH::TagList::has ( const std::string &  tag  )  const

whether we have the given tag

Returns:
whether we have the given tag
Precondition:
!tag.empty()
Guarantee
no-fail
std::string SH::TagList::join ( char  separator = ':'  )  const

join all the tags together into a string

Returns:
the joined tags
Parameters:
separator the separator to use
Guarantee
strong
Failures
out of memory II
separator used within tag
void SH::TagList::testInvariant (  )  const

test the invariant of this object

Guarantee
no-fail

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Apr 2017 for RootCore Packages by  doxygen 1.6.1