libStatGen Software 1
|
This class allows a user to easily get/set the fields in a GLF section/chromosome header. More...
#include <GlfRefSection.h>
Public Member Functions | |
GlfRefSection (const GlfRefSection &refSection) | |
Copy Constructor. | |
GlfRefSection & | operator= (const GlfRefSection &refSection) |
Overload operator= to copy the passed in refSection into this one. | |
bool | copy (const GlfRefSection &refSection) |
Copy the passed in refSection into this refSection. | |
void | resetRefSection () |
Clear this reference section back to the default setting. | |
bool | read (IFILE filePtr) |
Read the refSection from the specified file (file MUST be in the correct position for reading a refSection). | |
bool | write (IFILE filePtr) const |
Write the refSection to the specified file. | |
bool | getName (std::string &name) const |
Get the reference name. | |
uint32_t | getRefLen () const |
Get the length of the reference sequence. | |
bool | setName (const std::string &name) |
Set the reference name. | |
bool | setRefLen (uint32_t refLen) |
Set the length of the reference sequence. | |
void | print () const |
Print the reference section in a readable format. | |
This class allows a user to easily get/set the fields in a GLF section/chromosome header.
The GlfRefSection contains:
Definition at line 31 of file GlfRefSection.h.
GlfRefSection::GlfRefSection | ( | ) |
Definition at line 22 of file GlfRefSection.cpp.
GlfRefSection::~GlfRefSection | ( | ) |
Definition at line 29 of file GlfRefSection.cpp.
GlfRefSection::GlfRefSection | ( | const GlfRefSection & | refSection | ) |
Copy Constructor.
refSection | reference section to copy into this one. |
Definition at line 36 of file GlfRefSection.cpp.
References copy().
bool GlfRefSection::copy | ( | const GlfRefSection & | refSection | ) |
Copy the passed in refSection into this refSection.
refSection | reference section to copy into this one. |
Definition at line 51 of file GlfRefSection.cpp.
References resetRefSection().
Referenced by GlfRefSection(), and operator=().
bool GlfRefSection::getName | ( | std::string & | name | ) | const |
Get the reference name.
name | string to populate with the reference name. |
Definition at line 193 of file GlfRefSection.cpp.
uint32_t GlfRefSection::getRefLen | ( | ) | const |
Get the length of the reference sequence.
Definition at line 200 of file GlfRefSection.cpp.
GlfRefSection & GlfRefSection::operator= | ( | const GlfRefSection & | refSection | ) |
Overload operator= to copy the passed in refSection into this one.
refSection | reference section to copy into this one. |
Definition at line 44 of file GlfRefSection.cpp.
References copy().
void GlfRefSection::print | ( | ) | const |
Print the reference section in a readable format.
Definition at line 220 of file GlfRefSection.cpp.
bool GlfRefSection::read | ( | IFILE | filePtr | ) |
Read the refSection from the specified file (file MUST be in the correct position for reading a refSection).
filePtr | file to read from that is in the correct position. |
Definition at line 79 of file GlfRefSection.cpp.
References GlfStatus::FAIL_IO, ifeof(), and ifread().
Referenced by GlfFile::getNextRefSection().
void GlfRefSection::resetRefSection | ( | ) |
Clear this reference section back to the default setting.
Definition at line 70 of file GlfRefSection.cpp.
Referenced by copy().
bool GlfRefSection::setName | ( | const std::string & | name | ) |
Set the reference name.
name | reference name to set this section to. |
Definition at line 206 of file GlfRefSection.cpp.
bool GlfRefSection::setRefLen | ( | uint32_t | refLen | ) |
Set the length of the reference sequence.
refLen | reference sequence length to set this section to. |
Definition at line 213 of file GlfRefSection.cpp.
bool GlfRefSection::write | ( | IFILE | filePtr | ) | const |
Write the refSection to the specified file.
filePtr | file to write to that is in the correct position. |
Definition at line 142 of file GlfRefSection.cpp.
References GlfStatus::FAIL_IO, and ifwrite().
Referenced by GlfFile::writeRefSection().