Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | 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) noexcept
 moves a BaseQuals object, transferring ownership of the underlying htslib memory More...
 
BaseQualsoperator= (const BaseQuals &other)
 creates a deep copy of a BaseQuals object More...
 
BaseQualsoperator= (BaseQuals &&other) noexcept
 moves a BaseQuals object, transferring ownership of the underlying htslib memory More...
 
 ~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...
 
uint32_t size () const
 number of base qualities in the container 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)
noexcept

moves a BaseQuals object, transferring ownership of the underlying htslib memory

gamgee::BaseQuals::~BaseQuals ( )
default

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

Member Function Documentation

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)
noexcept

moves a BaseQuals object, transferring ownership of the underlying htslib memory

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

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

use freely as you would an array.

access an individual base quality by index

Note
currently implemented as read only
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


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