SamHeaderTag Class Reference

## Public Member Functions

| SamHeaderTag (const char *tag, const char *value)
| SamHeaderTag (const SamHeaderTag &)
bool | getTagString (std::string &tagString)
bool | setTag (const char *tag, const char *value)
bool | setValue (const char *value)
const char * | getTag ()
const char * | getValue ()
bool | hasValue ()

## Detailed Description

Definition at line 23 of file SamHeaderTag.h.

## Constructor & Destructor Documentation

## SamHeaderTag() [1/2]

SamHeaderTag::SamHeaderTag | ( | const char * | tag,
|  | const char * | value
| ) |  |

Definition at line 21 of file SamHeaderTag.cpp.

{
setTag(tag, value);
}

## SamHeaderTag() [2/2]

SamHeaderTag::SamHeaderTag | ( | const SamHeaderTag & | oldTag | ) |

Definition at line 27 of file SamHeaderTag.cpp.

{
setTag(oldTag.myTag.c_str(), oldTag.myValue.c_str());
}

## ~SamHeaderTag()

SamHeaderTag::~SamHeaderTag | ( |  | ) |

Definition at line 33 of file SamHeaderTag.cpp.

{
}

## Member Function Documentation

## getTag()

const char * SamHeaderTag::getTag | ( |  | ) |

Definition at line 74 of file SamHeaderTag.cpp.

{
return(myTag.c_str());
}

## getTagString()

bool SamHeaderTag::getTagString | ( | std::string & | tagString | ) |

Definition at line 40 of file SamHeaderTag.cpp.

{
if(myValue.length() != 0)
{
// There is a value associated with this tag, so add it to the string.
tagString += "\t";
tagString += myTag;
tagString += ":";
tagString += myValue;
return(true);
}
// This tag has no associated value, return false.
return(false);
}

## getValue()

const char * SamHeaderTag::getValue | ( |  | ) |

Definition at line 81 of file SamHeaderTag.cpp.

{
return(myValue.c_str());
}

## hasValue()

bool SamHeaderTag::hasValue | ( |  | ) |

Definition at line 88 of file SamHeaderTag.cpp.

{
return(myValue.size() != 0);
}

## setTag()

bool SamHeaderTag::setTag | ( | const char * | tag,
|  | const char * | value
| ) |  |

Definition at line 57 of file SamHeaderTag.cpp.

{
myTag = tag;
myValue = value;
return(true);
}

## setValue()

bool SamHeaderTag::setValue | ( | const char * | value | ) |

Definition at line 66 of file SamHeaderTag.cpp.

{
myValue = value;
return(true);
}

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

- bam/SamHeaderTag.h
- bam/SamHeaderTag.cpp