ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/PrimerMatch/fileStar.h
Revision: 1.1.1.1 (vendor branch)
Committed: Wed Dec 22 21:37:17 2004 UTC (11 years, 9 months ago) by nje01
Branch: MAIN
CVS Tags: HEAD, RELEASE-20041222, HEAD
Changes since 1.1: +0 -0 lines
Log Message:
Initial primer_match import

Line File contents
1 /**************************************************************************
2 * This code is part of the supporting infrastructure for ATA Mapper.
3 * Copyright (C) 2002,2003,2004 Applera Corporation. All rights reserved.
4 * Author: Nathan Edwards
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received (LICENSE.txt) a copy of the GNU General Public
17 * License along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *************************************************************************/
20
21 //================================================================
22 // Modified Brian Walenz's code. Provides methods for buffered I/O.
23 // VB 9/18/00
24 //===============================================================
25
26 #ifndef IBPEP_MS_NDX_filestar_h
27 #define IBPEP_MS_NDX_filestar_h
28
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <string>
32 #include "types.h"
33
34 class FileStarFile {
35 private:
36 FILE* bufF;
37 FILE_POSITION_TYPE _pos;
38 FILE_SIZE_TYPE _size;
39 public:
40 FileStarFile(std::string const &);
41 FileStarFile();
42 ~FileStarFile();
43
44 unsigned char getCharacter(void);
45 void openBuf(std::string const &fname);
46 inline bool isEndOfFile(void) const {
47 return(_pos >= _size);
48 }
49 FILE_POSITION_TYPE getPos() const ;
50 void setPos(FILE_POSITION_TYPE p);
51 FILE_SIZE_TYPE getSize() const {
52 return _size;
53 }
54 void reset();
55 };
56
57 #endif // BUFFEREDFILE_H