BamTools  2.5.1
Public Member Functions | List of all members
BamTools::SamReadGroupDictionary Class Reference

Container of SamReadGroup entries. More...

#include <SamReadGroupDictionary.h>

Public Member Functions

 SamReadGroupDictionary ()
 constructor More...
 
 SamReadGroupDictionary (const SamReadGroupDictionary &other)
 copy constructor More...
 
 ~SamReadGroupDictionary ()
 destructor More...
 
void Add (const SamReadGroup &readGroup)
 Appends a read group to the dictionary. More...
 
void Add (const std::string &readGroupId)
 Appends a read group to the dictionary. More...
 
void Add (const SamReadGroupDictionary &readGroups)
 Appends another read group dictionary to this one. More...
 
void Add (const std::vector< SamReadGroup > &readGroups)
 Appends multiple read groups to the dictionary. More...
 
void Add (const std::vector< std::string > &readGroupIds)
 Appends multiple read groups to the dictionary. More...
 
void Clear ()
 Clears all read group entries. More...
 
bool Contains (const SamReadGroup &readGroup) const
 Returns true if dictionary contains read group (matching on ID). More...
 
bool Contains (const std::string &readGroupId) const
 Returns true if dictionary contains read group. More...
 
bool IsEmpty () const
 Returns true if dictionary contains no read groups. More...
 
void Remove (const SamReadGroup &readGroup)
 Removes read group from dictionary, if found (matching on ID). More...
 
void Remove (const std::string &readGroupId)
 Removes read group from dictionary, if found. More...
 
void Remove (const std::vector< SamReadGroup > &readGroups)
 Removes multiple read groups from dictionary (matching on ID). More...
 
void Remove (const std::vector< std::string > &readGroupIds)
 Removes multiple read groups from dictionary. More...
 
int Size () const
 Returns number of read groups in dictionary. More...
 
SamReadGroupoperator[] (const std::string &readGroupId)
 Retrieves the modifiable SamReadGroup that matches readGroupId. More...
 
SamReadGroupIterator Begin ()
 
SamReadGroupConstIterator Begin () const
 
SamReadGroupConstIterator ConstBegin () const
 
SamReadGroupIterator End ()
 
SamReadGroupConstIterator End () const
 
SamReadGroupConstIterator ConstEnd () const
 

Detailed Description

Container of SamReadGroup entries.

Provides methods for operating on a collection of SamReadGroup entries.

Constructor & Destructor Documentation

◆ SamReadGroupDictionary() [1/2]

SamReadGroupDictionary::SamReadGroupDictionary ( )

constructor

◆ SamReadGroupDictionary() [2/2]

SamReadGroupDictionary::SamReadGroupDictionary ( const SamReadGroupDictionary other)

copy constructor

◆ ~SamReadGroupDictionary()

SamReadGroupDictionary::~SamReadGroupDictionary ( )

destructor

Member Function Documentation

◆ Add() [1/5]

void SamReadGroupDictionary::Add ( const SamReadGroup readGroup)

Appends a read group to the dictionary.

Duplicate entries are silently discarded.

Parameters
[in]readGroupentry to be added

◆ Add() [2/5]

void SamReadGroupDictionary::Add ( const SamReadGroupDictionary readGroups)

Appends another read group dictionary to this one.

This is an overloaded function.

Parameters
[in]readGroupsentries to be added
See also
Add()

◆ Add() [3/5]

void SamReadGroupDictionary::Add ( const std::string &  readGroupId)

Appends a read group to the dictionary.

This is an overloaded function.

Parameters
[in]readGroupIdID of read group to be added
See also
Add()

◆ Add() [4/5]

void SamReadGroupDictionary::Add ( const std::vector< SamReadGroup > &  readGroups)

Appends multiple read groups to the dictionary.

This is an overloaded function.

Parameters
[in]readGroupsentries to be added
See also
Add()

◆ Add() [5/5]

void SamReadGroupDictionary::Add ( const std::vector< std::string > &  readGroupIds)

Appends multiple read groups to the dictionary.

This is an overloaded function.

Parameters
[in]readGroupIdsIDs of read groups to be added
See also
Add()

◆ Begin() [1/2]

SamReadGroupIterator SamReadGroupDictionary::Begin ( )
Returns
an STL iterator pointing to the first read group
See also
ConstBegin(), End()

◆ Begin() [2/2]

SamReadGroupConstIterator SamReadGroupDictionary::Begin ( ) const
Returns
an STL const_iterator pointing to the first read group

This is an overloaded function.

See also
ConstBegin(), End()

◆ Clear()

void SamReadGroupDictionary::Clear ( )

Clears all read group entries.

◆ ConstBegin()

SamReadGroupConstIterator SamReadGroupDictionary::ConstBegin ( ) const
Returns
an STL const_iterator pointing to the first read group
See also
Begin(), ConstEnd()

◆ ConstEnd()

SamReadGroupConstIterator SamReadGroupDictionary::ConstEnd ( ) const
Returns
an STL const_iterator pointing to the imaginary entry after the last read group
See also
ConstBegin(), End()

◆ Contains() [1/2]

bool SamReadGroupDictionary::Contains ( const SamReadGroup readGroup) const

Returns true if dictionary contains read group (matching on ID).

This is an overloaded function.

Parameters
[in]readGroupsearch for this read group
Returns
true if dictionary contains read group (matching on ID).

◆ Contains() [2/2]

bool SamReadGroupDictionary::Contains ( const std::string &  readGroupId) const

Returns true if dictionary contains read group.

Parameters
[in]readGroupIdsearch for read group matching this ID
Returns
true if dictionary contains a read group with this ID

◆ End() [1/2]

SamReadGroupIterator SamReadGroupDictionary::End ( )
Returns
an STL iterator pointing to the imaginary entry after the last read group
See also
Begin(), ConstEnd()

◆ End() [2/2]

SamReadGroupConstIterator SamReadGroupDictionary::End ( ) const
Returns
an STL const_iterator pointing to the imaginary entry after the last read group

This is an overloaded function.

See also
Begin(), ConstEnd()

◆ IsEmpty()

bool SamReadGroupDictionary::IsEmpty ( ) const

Returns true if dictionary contains no read groups.

See also
Size()

◆ operator[]()

SamReadGroup & SamReadGroupDictionary::operator[] ( const std::string &  readGroupId)

Retrieves the modifiable SamReadGroup that matches readGroupId.

Note
If the dictionary contains no read group matching this ID, this function inserts a new one with this ID, and returns a reference to it. If you want to avoid this insertion behavior, check the result of Contains() before using this operator.
Parameters
[in]readGroupIdID of read group to retrieve
Returns
a modifiable reference to the SamReadGroup associated with the ID

◆ Remove() [1/4]

void SamReadGroupDictionary::Remove ( const SamReadGroup readGroup)

Removes read group from dictionary, if found (matching on ID).

This is an overloaded function.

Parameters
[in]readGroupread group to remove (matches on ID)

◆ Remove() [2/4]

void SamReadGroupDictionary::Remove ( const std::string &  readGroupId)

Removes read group from dictionary, if found.

Parameters
[in]readGroupIdID of read group to remove
See also
Remove()

◆ Remove() [3/4]

void SamReadGroupDictionary::Remove ( const std::vector< SamReadGroup > &  readGroups)

Removes multiple read groups from dictionary (matching on ID).

This is an overloaded function.

Parameters
[in]readGroupsread groups to remove
See also
Remove()

◆ Remove() [4/4]

void SamReadGroupDictionary::Remove ( const std::vector< std::string > &  readGroupIds)

Removes multiple read groups from dictionary.

This is an overloaded function.

Parameters
[in]readGroupIdsIDs of the read groups to remove
See also
Remove()

◆ Size()

int SamReadGroupDictionary::Size ( ) const

Returns number of read groups in dictionary.

See also
IsEmpty()

The documentation for this class was generated from the following files: