/usr/include/libGenome-1.3/libGenome/gnFileSource.h is in libgenome-1.3-dev 1.3.1-9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | /////////////////////////////////////////////////////////////////////////////
// File: gnFileSource.h
// Purpose: Implements gnBaseSource for .File files
// Description:
// Changes:
// Version: libGenome 0.5.1
// Author: Aaron Darling
// Modified by:
// Copyright: (c) Aaron Darling
// Licenses: See COPYING file for details
/////////////////////////////////////////////////////////////////////////////
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifndef _gnFileSource_h_
#define _gnFileSource_h_
#include "libGenome/gnDefs.h"
#include <string>
#include <fstream>
#include "libGenome/gnBaseSource.h"
#include "libGenome/gnFileContig.h"
#include "libGenome/gnException.h"
namespace genome {
/**
* gnFileSource is a standard interface to all file based sources of genetic information.
* All file source classes are derived from this class.
*/
class GNDLLEXPORT gnFileSource : public gnBaseSource
{
public:
gnFileSource();
gnFileSource(const gnFileSource& gnfs);
virtual ~gnFileSource(){}
virtual gnFileSource* Clone() const = 0;
// Open, Close
virtual void Open( std::string openString );
virtual void Open();
virtual void Close();
virtual std::string GetOpenString() const ;
// Filter
virtual const gnFilter* GetFilter() const ;
virtual void SetFilter( gnFilter* filter );
virtual boolean Read( const uint64 pos, char* buf, gnSeqI& bufLen );
/**
* Returns a pointer to the file contig corresponding to contigI or
* null if none exists.
*/
virtual gnFileContig* GetFileContig( const uint32 contigI ) const = 0;
protected:
void DetermineNewlineType();
std::string m_openString;
std::ifstream m_ifstream;
const gnFilter* m_pFilter;
gnNewlineType m_newlineType;
uint32 m_newlineSize;
private:
virtual boolean ParseStream( std::istream& fin ) = 0;
};// class gnFileSource
inline
std::string gnFileSource::GetOpenString( ) const
{
return m_openString;
}
// Filter
inline
const gnFilter* gnFileSource::GetFilter() const
{
return m_pFilter;
}
inline
void gnFileSource::SetFilter( gnFilter* filter )
{
if(filter == NULL){
Throw_gnEx(NullPointer());
}
m_pFilter = filter;
}
} // end namespace genome
#endif
// _gnFileSource_h_
|