Google

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 Methods

 gnSourceHeader ()
 Empty constructor. More...

 gnSourceHeader (gnBaseSource *source, const string &name, const uint32 begin, const uint32 length)
 Constructor, records the header's name and byte offset in the source. More...

 gnSourceHeader (const gnSourceHeader &s)
 Copy constructor. More...

 ~gnSourceHeader ()
 Destructor, frees memory. More...

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

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

uint32 GetLength () const
 Not implemented, use gnStringHeader. More...

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

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

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

void SetHeaderLength (const uint32 length)
 Get the header's length within the source. More...

void SetHeaderLoc (const pair< uint32, uint32 > startLen)
 Set the header's start position and length within the source. More...


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 30 of file gnSourceHeader.h.


Constructor & Destructor Documentation

gnSourceHeader::gnSourceHeader ( )
 

Empty constructor.

Definition at line 19 of file gnSourceHeader.cpp.

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 24 of file gnSourceHeader.cpp.

gnSourceHeader::gnSourceHeader ( const gnSourceHeader & s )
 

Copy constructor.

Parameters:
s   The gnSourceHeader to copy.

Definition at line 30 of file gnSourceHeader.cpp.

gnSourceHeader::~gnSourceHeader ( )
 

Destructor, frees memory.

Definition at line 36 of file gnSourceHeader.cpp.


Member Function Documentation

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

Reimplemented from gnBaseHeader.

Definition at line 99 of file gnSourceHeader.h.

string gnSourceHeader::GetHeader ( ) const [virtual]
 

Get the header.

Returns:
The header as a string.

Reimplemented from gnBaseHeader.

Definition at line 38 of file gnSourceHeader.cpp.

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 115 of file gnSourceHeader.h.

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

Get the header's name, if any.

Returns:
The header name as a string.

Reimplemented from gnBaseHeader.

Definition at line 103 of file gnSourceHeader.h.

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 107 of file gnSourceHeader.h.

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

Not implemented, use gnStringHeader.

Reimplemented from gnBaseHeader.

Definition at line 111 of file gnSourceHeader.h.

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

Get the header's length within the source.

Parameters:
length   The header length.

Definition at line 126 of file gnSourceHeader.h.

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 130 of file gnSourceHeader.h.

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 122 of file gnSourceHeader.h.


Member Data Documentation

uint32 gnSourceHeader::m_length [private]
 

Definition at line 94 of file gnSourceHeader.h.

string gnSourceHeader::m_name [private]
 

Definition at line 93 of file gnSourceHeader.h.

gnBaseSource * gnSourceHeader::m_source [private]
 

Definition at line 95 of file gnSourceHeader.h.

uint32 gnSourceHeader::m_start [private]
 

Definition at line 94 of file gnSourceHeader.h.


The documentation for this class was generated from the following files:
Generated at Fri Nov 30 15:36:56 2001 for libGenome by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001