gnSourceHeader Class Reference

gnSourceHeader is used to store a sequence header which resides in another source. More...

#include <gnSourceHeader.h>

Inheritance diagram for gnSourceHeader:

Inheritance graph
[legend]
Collaboration diagram for gnSourceHeader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

gnSourceHeaderClone () const
string GetHeader () const
 Get the header.
pair< uint32, uint32GetHeaderLoc () const
 Get the header's start position and length within the source.
string GetHeaderName () const
 Get the header's name, if any.
uint32 GetHeaderStart () const
 Get the header's start position within the source.
uint32 GetLength () const
 Not implemented, use gnStringHeader.
 gnSourceHeader (const gnSourceHeader &s)
 Copy constructor.
 gnSourceHeader (gnBaseSource *source, const string &name, const uint32 begin, const uint32 length)
 Constructor, records the header's name and byte offset in the source.
 gnSourceHeader ()
 Empty constructor.
void SetHeaderLength (const uint32 length)
 Get the header's length within the source.
void SetHeaderLoc (const pair< uint32, uint32 > startLen)
 Set the header's start position and length within the source.
void SetHeaderStart (const uint32 start)
 Set the header's start position within the source.
 ~gnSourceHeader ()
 Destructor, frees memory.

Private Attributes

uint32 m_length
string m_name
gnBaseSourcem_source
uint32 m_start

Detailed Description

gnSourceHeader is used to store a sequence header which resides in another source.

gnSourceHeaders are created by gnSEQSource and other sources and placed into a spec.

Definition at line 27 of file gnSourceHeader.h.


Constructor & Destructor Documentation

gnSourceHeader::gnSourceHeader  ) 
 

Empty constructor.

Definition at line 18 of file gnSourceHeader.cpp.

References m_length, m_source, and m_start.

Referenced by Clone().

gnSourceHeader::gnSourceHeader gnBaseSource source,
const string &  name,
const uint32  begin,
const uint32  length
 

Constructor, records the header's name and byte offset in the source.

Parameters:
source The source which contains the header.
name The name of the header.
begin The offset into the source where the header starts.
length The length of the header.
Definition at line 23 of file gnSourceHeader.cpp.

References m_length, m_name, m_source, m_start, and uint32.

gnSourceHeader::gnSourceHeader const gnSourceHeader s  ) 
 

Copy constructor.

Parameters:
s The gnSourceHeader to copy.
Definition at line 29 of file gnSourceHeader.cpp.

References m_length, m_name, m_source, and m_start.

gnSourceHeader::~gnSourceHeader  ) 
 

Destructor, frees memory.

Definition at line 35 of file gnSourceHeader.cpp.


Member Function Documentation

gnSourceHeader * gnSourceHeader::Clone  )  const [inline, virtual]
 

Implements gnBaseHeader.

Definition at line 96 of file gnSourceHeader.h.

References gnSourceHeader().

string gnSourceHeader::GetHeader  )  const [virtual]
 

Get the header.

Returns:
The header as a string.

Implements gnBaseHeader.

Definition at line 37 of file gnSourceHeader.cpp.

References gnSeqI, m_length, m_source, m_start, and gnBaseSource::Read().

pair< uint32, uint32 > gnSourceHeader::GetHeaderLoc  )  const [inline]
 

Get the header's start position and length within the source.

Returns:
The header start position and length as a pair.
Definition at line 112 of file gnSourceHeader.h.

References m_length, and m_start.

string gnSourceHeader::GetHeaderName  )  const [inline, virtual]
 

Get the header's name, if any.

Returns:
The header name as a string.

Implements gnBaseHeader.

Definition at line 100 of file gnSourceHeader.h.

References m_name.

uint32 gnSourceHeader::GetHeaderStart  )  const [inline]
 

Get the header's start position within the source.

Returns:
The byte offset of the header's start position.
Definition at line 104 of file gnSourceHeader.h.

References m_start, and uint32.

uint32 gnSourceHeader::GetLength  )  const [inline, virtual]
 

Not implemented, use gnStringHeader.

Implements gnBaseHeader.

Definition at line 108 of file gnSourceHeader.h.

References m_length, and uint32.

void gnSourceHeader::SetHeaderLength const uint32  length  )  [inline]
 

Get the header's length within the source.

Parameters:
length The header length.
Definition at line 123 of file gnSourceHeader.h.

References m_length, and uint32.

void gnSourceHeader::SetHeaderLoc const pair< uint32, uint32 startLen  )  [inline]
 

Set the header's start position and length within the source.

Parameters:
startLen The header start position and length as a pair.
Definition at line 127 of file gnSourceHeader.h.

References m_length, and m_start.

void gnSourceHeader::SetHeaderStart const uint32  start  )  [inline]
 

Set the header's start position within the source.

Parameters:
start The header start position.
Definition at line 119 of file gnSourceHeader.h.

References m_start, and uint32.


Member Data Documentation

uint32 gnSourceHeader::m_length [private]
 

Definition at line 91 of file gnSourceHeader.h.

Referenced by GetHeader(), GetHeaderLoc(), GetLength(), gnSourceHeader(), SetHeaderLength(), and SetHeaderLoc().

string gnSourceHeader::m_name [private]
 

Definition at line 90 of file gnSourceHeader.h.

Referenced by GetHeaderName(), and gnSourceHeader().

gnBaseSource* gnSourceHeader::m_source [private]
 

Definition at line 92 of file gnSourceHeader.h.

Referenced by GetHeader(), and gnSourceHeader().

uint32 gnSourceHeader::m_start [private]
 

Definition at line 91 of file gnSourceHeader.h.

Referenced by GetHeader(), GetHeaderLoc(), GetHeaderStart(), gnSourceHeader(), SetHeaderLoc(), and SetHeaderStart().


The documentation for this class was generated from the following files:
Generated on Mon Feb 14 19:29:57 2005 for libGenome by doxygen 1.3.8