// ***************************************************************************
// SamProgramChain.cpp (c) 2011 Derek Barnett
// Marth Lab, Department of Biology, Boston College
// ***************************************************************************
// SamProgramChain.cpp (c) 2011 Derek Barnett
// Marth Lab, Department of Biology, Boston College
// ---------------------------------------------------------------------------
// Provides methods for operating on a SamProgram record "chain"
// ***************************************************************************
// ---------------------------------------------------------------------------
// Provides methods for operating on a SamProgram record "chain"
// ***************************************************************************
appearance in SamHeader and subsequent Add() calls. Using the current
iterators will not allow you to step through the header's program history.
Instead use First()/Last() to access oldest/newest records, respectively.
appearance in SamHeader and subsequent Add() calls. Using the current
iterators will not allow you to step through the header's program history.
Instead use First()/Last() to access oldest/newest records, respectively.
appearance in SamHeader and subsequent Add() calls. Using the current
iterators will not allow you to step through the header's program history.
Instead use First()/Last() to access oldest/newest records, respectively.
appearance in SamHeader and subsequent Add() calls. Using the current
iterators will not allow you to step through the header's program history.
Instead use First()/Last() to access oldest/newest records, respectively.
\return \c true if chain contains program (matching on ID)
*/
bool SamProgramChain::Contains(const SamProgram& program) const {
\return \c true if chain contains program (matching on ID)
*/
bool SamProgramChain::Contains(const SamProgram& program) const {
/*! \fn bool SamProgramChain::Contains(const std::string& programId) const
\brief Returns true if chains has a program record with this ID
/*! \fn bool SamProgramChain::Contains(const std::string& programId) const
\brief Returns true if chains has a program record with this ID
\return \c true if chain contains a program record with this ID
*/
bool SamProgramChain::Contains(const std::string& programId) const {
\return \c true if chain contains a program record with this ID
*/
bool SamProgramChain::Contains(const std::string& programId) const {
check the result of IsEmpty() before calling this function.
\return a modifiable reference to the first (oldest) program entry
check the result of IsEmpty() before calling this function.
\return a modifiable reference to the first (oldest) program entry
check the result of IsEmpty() before calling this function.
\return a read-only reference to the first (oldest) program entry
check the result of IsEmpty() before calling this function.
\return a read-only reference to the first (oldest) program entry
check the result of IsEmpty() before calling this function.
\return a modifiable reference to the last (newest) program entry
check the result of IsEmpty() before calling this function.
\return a modifiable reference to the last (newest) program entry
check the result of IsEmpty() before calling this function.
\return a read-only reference to the last (newest) program entry
check the result of IsEmpty() before calling this function.
\return a read-only reference to the last (newest) program entry
\return ID of program record, whose PreviousProgramID matches \a programId.
Otherwise, returns empty string if none found.
*/
\return ID of program record, whose PreviousProgramID matches \a programId.
Otherwise, returns empty string if none found.
*/
/*! \fn SamProgram& SamProgramChain::operator[](const std::string& programId)
\brief Retrieves the modifiable SamProgram record that matches \a programId.
/*! \fn SamProgram& SamProgramChain::operator[](const std::string& programId)
\brief Retrieves the modifiable SamProgram record that matches \a programId.
- NOTE - If the chain contains no read group matching this ID, this function will
- print an error and terminate.
+ \warning If the chain contains no read group matching this ID, this function will
+ print an error and terminate. Check the return value of Contains() if this may be
+ possible.
\return a modifiable reference to the SamProgram associated with the ID
*/
SamProgram& SamProgramChain::operator[](const std::string& programId) {
\return a modifiable reference to the SamProgram associated with the ID
*/
SamProgram& SamProgramChain::operator[](const std::string& programId) {