BamTools::SamSequenceDictionary Class Reference

Container of SamSequence entries. More...

#include <SamSequenceDictionary.h>

List of all members.

Public Member Functions

 SamSequenceDictionary (void)
 constructor
 SamSequenceDictionary (const SamSequenceDictionary &other)
 copy constructor
 ~SamSequenceDictionary (void)
 destructor
void Add (const SamSequence &sequence)
 Appends a sequence to the dictionary.
void Add (const std::string &name, const int &length)
 Appends a sequence to the dictionary.
void Add (const SamSequenceDictionary &sequences)
 Appends another sequence dictionary to this one.
void Add (const std::vector< SamSequence > &sequences)
 Appends multiple sequences to the dictionary.
void Add (const std::map< std::string, int > &sequenceMap)
 Appends multiple sequences to the dictionary.
void Clear (void)
 Clears all sequence entries.
bool Contains (const SamSequence &sequence) const
 Returns true if dictionary contains sequence (matches on name).
bool Contains (const std::string &sequenceName) const
 Returns true if dictionary contains sequence.
bool IsEmpty (void) const
 Returns true if dictionary contains no sequences.
void Remove (const SamSequence &sequence)
 Removes sequence from dictionary, if found (matches on name).
void Remove (const std::string &sequenceName)
 Removes sequence from dictionary, if found.
void Remove (const std::vector< SamSequence > &sequences)
 Removes multiple sequences from dictionary.
void Remove (const std::vector< std::string > &sequenceNames)
 Removes multiple sequences from dictionary.
int Size (void) const
 Returns number of sequences in dictionary.
SamSequenceoperator[] (const std::string &sequenceName)
 Retrieves the modifiable SamSequence that matches sequenceName.
SamSequenceIterator Begin (void)
SamSequenceConstIterator Begin (void) const
SamSequenceConstIterator ConstBegin (void) const
SamSequenceIterator End (void)
SamSequenceConstIterator End (void) const
SamSequenceConstIterator ConstEnd (void) const

Detailed Description

Container of SamSequence entries.

Provides methods for operating on a collection of SamSequence entries.


Constructor & Destructor Documentation

SamSequenceDictionary::SamSequenceDictionary ( void   ) 

constructor

SamSequenceDictionary::SamSequenceDictionary ( const SamSequenceDictionary other  ) 

copy constructor

SamSequenceDictionary::~SamSequenceDictionary ( void   ) 

destructor


Member Function Documentation

void SamSequenceDictionary::Add ( const std::map< std::string, int > &  sequenceMap  ) 

Appends multiple sequences to the dictionary.

This is an overloaded function.

Parameters:
[in] sequenceMap map of sequence entries (name => length) to be added
See also:
Add()
void SamSequenceDictionary::Add ( const std::vector< SamSequence > &  sequences  ) 

Appends multiple sequences to the dictionary.

This is an overloaded function.

Parameters:
[in] sequences entries to be added
See also:
Add()
void SamSequenceDictionary::Add ( const SamSequenceDictionary sequences  ) 

Appends another sequence dictionary to this one.

This is an overloaded function.

Parameters:
[in] sequences sequence dictionary to be appended
See also:
Add()
void SamSequenceDictionary::Add ( const std::string &  name,
const int &  length 
)

Appends a sequence to the dictionary.

This is an overloaded function.

Parameters:
[in] name name of sequence entry to be added
[in] length length of sequence entry to be added
See also:
Add()
void SamSequenceDictionary::Add ( const SamSequence sequence  ) 

Appends a sequence to the dictionary.

Duplicate entries are silently discarded.

Parameters:
[in] sequence entry to be added
SamSequenceConstIterator SamSequenceDictionary::Begin ( void   )  const
Returns:
an STL const_iterator pointing to the first sequence

This is an overloaded function.

See also:
ConstBegin(), End()
SamSequenceIterator SamSequenceDictionary::Begin ( void   ) 
Returns:
an STL iterator pointing to the first sequence
See also:
ConstBegin(), End()
void SamSequenceDictionary::Clear ( void   ) 

Clears all sequence entries.

SamSequenceConstIterator SamSequenceDictionary::ConstBegin ( void   )  const
Returns:
an STL const_iterator pointing to the first sequence
See also:
Begin(), ConstEnd()
SamSequenceConstIterator SamSequenceDictionary::ConstEnd ( void   )  const
Returns:
an STL const_iterator pointing to the imaginary entry after the last sequence
See also:
End(), ConstBegin()
bool SamSequenceDictionary::Contains ( const std::string &  sequenceName  )  const

Returns true if dictionary contains sequence.

Parameters:
[in] sequenceName search for sequence matching this name
Returns:
true if dictionary contains a sequence with this name
bool SamSequenceDictionary::Contains ( const SamSequence sequence  )  const

Returns true if dictionary contains sequence (matches on name).

This is an overloaded function.

Parameters:
[in] sequence search for this sequence
Returns:
true if dictionary contains sequence (matching on name)
SamSequenceConstIterator SamSequenceDictionary::End ( void   )  const
Returns:
an STL const_iterator pointing to the imaginary entry after the last sequence

This is an overloaded function.

See also:
Begin(), ConstEnd()
SamSequenceIterator SamSequenceDictionary::End ( void   ) 
Returns:
an STL iterator pointing to the imaginary entry after the last sequence
See also:
Begin(), ConstEnd()
bool SamSequenceDictionary::IsEmpty ( void   )  const

Returns true if dictionary contains no sequences.

See also:
Size()
SamSequence & SamSequenceDictionary::operator[] ( const std::string &  sequenceName  ) 

Retrieves the modifiable SamSequence that matches sequenceName.

Note:
If the dictionary contains no sequence matching this name, this function inserts a new one with this name (length:0), 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] sequenceName name of sequence to retrieve
Returns:
a modifiable reference to the SamSequence associated with the name
void SamSequenceDictionary::Remove ( const std::vector< std::string > &  sequenceNames  ) 

Removes multiple sequences from dictionary.

This is an overloaded function.

Parameters:
[in] sequenceNames names of the sequences to remove
See also:
Remove()
void SamSequenceDictionary::Remove ( const std::vector< SamSequence > &  sequences  ) 

Removes multiple sequences from dictionary.

This is an overloaded function.

Parameters:
[in] sequences sequences to remove
See also:
Remove()
void SamSequenceDictionary::Remove ( const std::string &  sequenceName  ) 

Removes sequence from dictionary, if found.

Parameters:
[in] sequenceName name of sequence to remove
See also:
Remove()
void SamSequenceDictionary::Remove ( const SamSequence sequence  ) 

Removes sequence from dictionary, if found (matches on name).

This is an overloaded function.

Parameters:
[in] sequence SamSequence to remove (matching on name)
int SamSequenceDictionary::Size ( void   )  const

Returns number of sequences in dictionary.

See also:
IsEmpty()

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Aug 29 17:43:46 2012 for BamTools by  doxygen 1.6.3