Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

gnSourceHeader Class Reference

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

#include <gnSourceHeader.h>

Inheritance diagram for gnSourceHeader:

gnBaseHeader gnClone List of all members.

Public Member Functions

 gnSourceHeader ()
 Empty 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 (const gnSourceHeader &s)
 Copy constructor.

 ~gnSourceHeader ()
 Destructor, frees memory.

gnSourceHeader * Clone () const
string GetHeader () const
 Get the header.

string GetHeaderName () const
 Get the header's name, if any.

uint32 GetLength () const
 Not implemented, use gnStringHeader.

uint32 GetHeaderStart () const
 Get the header's start position within the source.

pair< uint32, uint32GetHeaderLoc () const
 Get the header's start position and length within the source.

void SetHeaderStart (const uint32 start)
 Set the header's start position within the source.

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.


Private Attributes

string m_name
uint32 m_start
uint32 m_length
gnBaseSourcem_source

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, and m_start.

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 Array< T >::data, m_length, m_source, gnBaseSource::Read(), and uint32.

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.

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.


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 GetHeaderLoc(), GetHeaderStart(), gnSourceHeader(), SetHeaderLoc(), and SetHeaderStart().


The documentation for this class was generated from the following files:
Generated on Mon Feb 3 02:34:54 2003 for libGenome by doxygen1.3-rc3