Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
gamgee::BaseQuals Class Reference

Utility class to handle the memory management of the sam record object for a read base qualities. More...

#include <base_quals.h>

Public Member Functions

 BaseQuals (const std::shared_ptr< bam1_t > &sam_record)
 creates a BaseQuals object that points to htslib memory already allocated More...
 
 BaseQuals (const BaseQuals &other)
 creates a deep copy of a BaseQuals object More...
 
 BaseQuals (BaseQuals &&other)=default
 
BaseQualsoperator= (const BaseQuals &other)
 creates a deep copy of a BaseQuals object More...
 
BaseQualsoperator= (BaseQuals &&other)=default
 
 ~BaseQuals ()=default
 Default destruction is sufficient, since our shared_ptr will handle deallocation. More...
 
uint8_t operator[] (const uint32_t index) const
 use freely as you would an array. More...
 
uint8_t & operator[] (const uint32_t index)
 use freely as you would an array More...
 
uint32_t size () const
 number of base qualities in the container More...
 
bool operator== (const BaseQuals &other) const
 check for equality with another BaseQuals object More...
 
bool operator!= (const BaseQuals &other) const
 check for inequality with another BaseQuals object More...
 
std::string to_string () const
 produce a string representation of the base qualities in this object More...
 

Friends

class SamBuilder
 builder needs access to the internals in order to build efficiently More...
 

Detailed Description

Utility class to handle the memory management of the sam record object for a read base qualities.

Constructor & Destructor Documentation

gamgee::BaseQuals::BaseQuals ( const std::shared_ptr< bam1_t > &  sam_record)
explicit

creates a BaseQuals object that points to htslib memory already allocated

Note
the resulting BaseQuals object shares ownership of the pre-allocated memory via shared_ptr reference counting
gamgee::BaseQuals::BaseQuals ( const BaseQuals other)

creates a deep copy of a BaseQuals object

Note
the copy will have exclusive ownership over the newly-allocated htslib memory
gamgee::BaseQuals::BaseQuals ( BaseQuals &&  other)
default
gamgee::BaseQuals::~BaseQuals ( )
default

Default destruction is sufficient, since our shared_ptr will handle deallocation.

Member Function Documentation

bool gamgee::BaseQuals::operator!= ( const BaseQuals other) const

check for inequality with another BaseQuals object

check whether this object does not contain the same base qualities as another BaseQuals object

BaseQuals & gamgee::BaseQuals::operator= ( const BaseQuals other)

creates a deep copy of a BaseQuals object

Note
the copy will have exclusive ownership over the newly-allocated htslib memory

< shared_ptr assignment will take care of deallocating old sam record if necessary

BaseQuals& gamgee::BaseQuals::operator= ( BaseQuals &&  other)
default
bool gamgee::BaseQuals::operator== ( const BaseQuals other) const

check for equality with another BaseQuals object

check whether this object contains the same base qualities as another BaseQuals object

uint8_t gamgee::BaseQuals::operator[] ( const uint32_t  index) const

use freely as you would an array.

access an individual base quality by index

Returns
base quality at the specified index as an unsigned byte
uint8_t & gamgee::BaseQuals::operator[] ( const uint32_t  index)

use freely as you would an array

access and/or modify an individual base quality by index

Returns
base quality at the specified index as an unsigned byte
uint32_t gamgee::BaseQuals::size ( ) const
inline

number of base qualities in the container

std::string gamgee::BaseQuals::to_string ( ) const

produce a string representation of the base qualities in this object

Friends And Related Function Documentation

friend class SamBuilder
friend

builder needs access to the internals in order to build efficiently


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