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 | Friends | List of all members
gamgee::SamHeader Class Reference

Utility class to hold the header of a sam file. More...

#include <sam_header.h>

Public Member Functions

 SamHeader ()=default
 initializes a null SamHeader More...
 
 SamHeader (const std::shared_ptr< bam_hdr_t > &header)
 creates a SamHeader given htslib object. More...
 
 SamHeader (const SamHeader &other)
 makes a deep copy of a SamHeader. Shared pointers maintain state to all other associated objects correctly. More...
 
 SamHeader (SamHeader &&other) noexcept
 moves SamHeader accordingly. Shared pointers maintain state to all other associated objects correctly. More...
 
SamHeaderoperator= (const SamHeader &other)
 deep copy assignment of a SamHeader. Shared pointers maintain state to all other associated objects correctly. More...
 
SamHeaderoperator= (SamHeader &&other) noexcept
 move assignment of a SamHeader. Shared pointers maintain state to all other associated objects correctly. More...
 

Friends

class SamWriter
 

Detailed Description

Utility class to hold the header of a sam file.

Constructor & Destructor Documentation

gamgee::SamHeader::SamHeader ( )
explicitdefault

initializes a null SamHeader

Warning
if you need to create a SamHeader from scratch, use the builder instead
gamgee::SamHeader::SamHeader ( const std::shared_ptr< bam_hdr_t > &  header)
explicit

creates a SamHeader given htslib object.

creates a SamHeader object that points to htslib memory already allocated

Note
used by all iterators
the resulting SamHeader object shares ownership of the pre-allocated memory via shared_ptr reference counting
gamgee::SamHeader::SamHeader ( const SamHeader other)

makes a deep copy of a SamHeader. Shared pointers maintain state to all other associated objects correctly.

creates a deep copy of a SamHeader object

Note
the copy will have exclusive ownership over the newly-allocated htslib memory
gamgee::SamHeader::SamHeader ( SamHeader &&  other)
noexcept

moves SamHeader accordingly. Shared pointers maintain state to all other associated objects correctly.

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

Member Function Documentation

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

deep copy assignment of a SamHeader. Shared pointers maintain state to all other associated objects correctly.

creates a deep copy of a SamHeader 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

SamHeader & gamgee::SamHeader::operator= ( SamHeader &&  other)
noexcept

move assignment of a SamHeader. Shared pointers maintain state to all other associated objects correctly.

Friends And Related Function Documentation

friend class SamWriter
friend

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