Loading...
Searching...
No Matches
SamHeaderRG Class Reference
Inheritance diagram for SamHeaderRG:
[legend]
Collaboration diagram for SamHeaderRG:
[legend]

## Public Member Functions

virtual SamHeaderRecord * | createCopy () const
| Return a pointer to a newly created header record of the appropriate type that is a copy of this record.
Public Member Functions inherited from SamHeaderRecord
| SamHeaderRecord ()
| Constructor.
virtual | ~SamHeaderRecord ()
| Destructor.
bool | setFields (const StringArray &tokens)
| Set the fields from the passed in line.
bool | isValid ()
| Check to see if the record is valid.
const char * | getTagValue (const char *tag) const
| Return the value associated with the specified tag.
bool | setTag (const char *tag, const char *value)
| Set the value of the specified tag to the specified value, deletes the tag when value is NULL.
void | reset ()
| Reset this header record to an empty state with no tags.
bool | appendString (std::string &header)
| Appends the string representation of this header record to the passed in string.
bool | addKey (const char *value)
| Add the key tag with the specified value (not for HD headers).
const char * | getKeyValue () const
| Get the value associated with the key tag. Returns "" if it is not set.
bool | isActiveHeaderRecord ()
| This record is active (true) if there is at least one tag set.
const char * | getTypeString ()
| Return the type of this header record (HD, SQ, RG, or PG) as a string.
SamHeaderRecordType | getType ()
| Return the type of this header record (HD, SQ, RG, or PG) as an enum.

## Additional Inherited Members

Public Types inherited from SamHeaderRecord
enum | SamHeaderRecordType { HD , SQ , RG , PG }
| Specifies the Type for the sam header record (line). More...
Protected Member Functions inherited from SamHeaderRecord
void | addRequiredTag (const char *requiredTag)
virtual void | internalCopy (SamHeaderRecord &newRec) const
Protected Attributes inherited from SamHeaderRecord
std::string | myTypeString
SamHeaderRecordType | myType
std::string | myKeyTag

## Detailed Description

Definition at line 23 of file SamHeaderRG.h.

## Constructor & Destructor Documentation

## SamHeaderRG()

SamHeaderRG::SamHeaderRG | ( |  | ) |

Definition at line 21 of file SamHeaderRG.cpp.

{
// Add required tags for this type.
myType = SamHeaderRecord::RG;
myTypeString = "RG";
addRequiredTag("ID");
myKeyTag = "ID";
}
SamHeaderRecord::RG
@ RG
Read Group.
Definition SamHeaderRecord.h:34

## ~SamHeaderRG()

SamHeaderRG::~SamHeaderRG | ( |  | ) |

virtual

Definition at line 32 of file SamHeaderRG.cpp.

{
}

## Member Function Documentation

## createCopy()

SamHeaderRecord * SamHeaderRG::createCopy | ( |  | ) | const

virtual

Return a pointer to a newly created header record of the appropriate type that is a copy of this record.

The newly created record will not be deleted by this class and it is the responsibility of the calling method to handle the deletion. Returns NULL on failure to copy.

Implements SamHeaderRecord.

Definition at line 37 of file SamHeaderRG.cpp.

{
SamHeaderRG* newRG = new SamHeaderRG();
if(newRG == NULL)
{
std::cerr << "Failed to create a copy of an RG Header Record\n" ;
return(NULL);
}
internalCopy(*newRG);
return(newRG);
}

References SamHeaderRecord::SamHeaderRecord().

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

- bam/SamHeaderRG.h
- bam/SamHeaderRG.cpp