#include <gnFileSource.h>
Inheritance diagram for gnFileSource:
Public Member Functions | |
virtual gnFileSource * | Clone () const =0 |
virtual void | Close () |
Closes the file or connection this source is reading from. | |
virtual gnFileContig * | GetFileContig (const uint32 contigI) const =0 |
Returns a pointer to the file contig corresponding to contigI or null if none exists. | |
virtual const gnFilter * | GetFilter () const |
Get the filter currently being used to filter unwanted characters out of read sequences. | |
virtual string | GetOpenString () const |
Get the location of the source that is being used. | |
gnFileSource (const gnFileSource &gnfs) | |
gnFileSource () | |
virtual void | Open () |
Opens this source for reading. | |
virtual void | Open (string openString) |
Opens the source given in "openString" for reading. | |
virtual boolean | Read (const uint64 pos, char *buf, gnSeqI &bufLen) |
Gets raw input from this source. | |
virtual void | SetFilter (gnFilter *filter) |
Set the filter that will be used to filter unwanted characters out of the sequence data. | |
virtual | ~gnFileSource () |
Protected Member Functions | |
void | DetermineNewlineType () |
Protected Attributes | |
ifstream | m_ifstream |
uint32 | m_newlineSize |
gnNewlineType | m_newlineType |
string | m_openString |
const gnFilter * | m_pFilter |
Private Member Functions | |
virtual boolean | ParseStream (istream &fin)=0 |
All file source classes are derived from this class.
Definition at line 27 of file gnFileSource.h.
|
Definition at line 30 of file gnFileSource.h. |
|
Definition at line 18 of file gnFileSource.cpp. References m_ifstream, m_newlineSize, m_newlineType, m_openString, and m_pFilter. |
|
Definition at line 32 of file gnFileSource.h. |
|
Implements gnBaseSource.
Implemented in gnABISource, gnDNXSource, gnFASSource, gnGBKSource, gnRAWSource, and gnSEQSource.
|
|
Closes the file or connection this source is reading from.
Implements gnBaseSource. Definition at line 56 of file gnFileSource.cpp. References m_ifstream, and Throw_gnEx. |
|
Definition at line 74 of file gnFileSource.cpp. References gnNewlineMac, gnNewlineUnix, gnNewlineWindows, m_ifstream, m_newlineSize, and m_newlineType. Referenced by gnGBKSource::ParseStream(), and gnFASSource::ParseStream(). |
|
Returns a pointer to the file contig corresponding to contigI or null if none exists.
Implemented in gnABISource, gnDNXSource, gnFASSource, gnGBKSource, gnRAWSource, and gnSEQSource.
|
|
Get the filter currently being used to filter unwanted characters out of read sequences.
Implements gnBaseSource. Definition at line 68 of file gnFileSource.h. References m_pFilter. |
|
Get the location of the source that is being used.
Implements gnBaseSource. Definition at line 62 of file gnFileSource.h. |
|
Opens this source for reading.
Implements gnBaseSource. Definition at line 48 of file gnFileSource.cpp. References m_ifstream, m_openString, and Throw_gnEx. |
|
Opens the source given in "openString" for reading.
Implements gnBaseSource. Definition at line 29 of file gnFileSource.cpp. References m_ifstream, m_openString, ParseStream(), and Throw_gnEx. Referenced by main(). |
|
Implemented in gnABISource, gnDNXSource, gnFASSource, gnGBKSource, gnRAWSource, and gnSEQSource.
Referenced by Open(). |
|
Gets raw input from this source. Read will attempt to read "bufLen" bytes starting at "pos" directly from the source. It stores the data in "buf", and returns the actual number of bytes read in bufLen. Read will return false if a serious error occurs.
Implements gnBaseSource. Definition at line 63 of file gnFileSource.cpp. References gnSeqI, m_ifstream, and uint64. Referenced by gnRAWSource::SeqRead(). |
|
Set the filter that will be used to filter unwanted characters out of the sequence data.
Implements gnBaseSource. Definition at line 74 of file gnFileSource.h. References m_pFilter, and Throw_gnEx. |
|
Definition at line 53 of file gnFileSource.h. Referenced by Close(), DetermineNewlineType(), gnFileSource(), Open(), and Read(). |
|
Definition at line 56 of file gnFileSource.h. Referenced by DetermineNewlineType(), and gnFileSource(). |
|
Definition at line 55 of file gnFileSource.h. Referenced by DetermineNewlineType(), and gnFileSource(). |
|
Definition at line 52 of file gnFileSource.h. Referenced by gnFileSource(), and Open(). |
|
Definition at line 54 of file gnFileSource.h. Referenced by GetFilter(), gnFileSource(), and SetFilter(). |