libStatGen Software  1
Cigar::CigarOperator Struct Reference

List of all members.

Public Member Functions

 CigarOperator (Operation operation, uint32_t count)
 Set the cigar operator with the specified operation and count length.
char getChar () const
 Get the character code (M, I, D, N, S, H, or P) associated with this operation.
bool operator== (const CigarOperator &rhs) const
 Compare only on the operator, true if they are the same, false if not. Match and mismatch are considered the same for CIGAR strings.
bool operator!= (const CigarOperator &rhs) const
 Compare only on the operator, false if they are the same, true if not. Match and mismatch are considered the same for CIGAR strings.

Public Attributes

Operation operation
uint32_t count

Detailed Description

Definition at line 107 of file Cigar.h.


Constructor & Destructor Documentation

Cigar::CigarOperator::CigarOperator ( Operation  operation,
uint32_t  count 
) [inline]

Set the cigar operator with the specified operation and count length.

Definition at line 118 of file Cigar.h.

            : operation(operation), count(count) {};

Member Function Documentation

char Cigar::CigarOperator::getChar ( ) const [inline]

Get the character code (M, I, D, N, S, H, or P) associated with this operation.

Definition at line 127 of file Cigar.h.

References Cigar::del, Cigar::hardClip, Cigar::insert, Cigar::match, Cigar::mismatch, Cigar::none, Cigar::pad, Cigar::skip, and Cigar::softClip.

        {
            switch (operation)
            {
                case none:
                    return '?';  // error
                case match:
                case mismatch:
                    return'M';
                case insert:
                    return 'I';
                case del:
                    return'D';
                case skip:
                    return 'N';
                case softClip:
                    return 'S';
                case hardClip:
                    return 'H';
                case pad:
                    return 'P';
            }
            return '?'; // actually it is an error to get here
        }

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends