libStatGen Software 1
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.

22{
23 setTag(tag, value);
24}

◆ SamHeaderTag() [2/2]

SamHeaderTag::SamHeaderTag ( const SamHeaderTag oldTag)

Definition at line 27 of file SamHeaderTag.cpp.

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

◆ ~SamHeaderTag()

SamHeaderTag::~SamHeaderTag ( )

Definition at line 33 of file SamHeaderTag.cpp.

34{
35}

Member Function Documentation

◆ getTag()

const char * SamHeaderTag::getTag ( )

Definition at line 74 of file SamHeaderTag.cpp.

75{
76 return(myTag.c_str());
77}

◆ getTagString()

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

Definition at line 40 of file SamHeaderTag.cpp.

41{
42 if(myValue.length() != 0)
43 {
44 // There is a value associated with this tag, so add it to the string.
45 tagString += "\t";
46 tagString += myTag;
47 tagString += ":";
48 tagString += myValue;
49 return(true);
50 }
51 // This tag has no associated value, return false.
52 return(false);
53}

◆ getValue()

const char * SamHeaderTag::getValue ( )

Definition at line 81 of file SamHeaderTag.cpp.

82{
83 return(myValue.c_str());
84}

◆ hasValue()

bool SamHeaderTag::hasValue ( )

Definition at line 88 of file SamHeaderTag.cpp.

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

◆ setTag()

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

Definition at line 57 of file SamHeaderTag.cpp.

58{
59 myTag = tag;
60 myValue = value;
61 return(true);
62}

◆ setValue()

bool SamHeaderTag::setValue ( const char *  value)

Definition at line 66 of file SamHeaderTag.cpp.

67{
68 myValue = value;
69 return(true);
70}

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