OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
AbsFileStream.h
Go to the documentation of this file.
1#ifndef OPALX_AbsFileStream_HH
2#define OPALX_AbsFileStream_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: AbsFileStream.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: AbsFileStream
13//
14// ------------------------------------------------------------------------
15// Class category: Parser
16// ------------------------------------------------------------------------
17//
18// $Date: 2000/03/27 09:32:37 $
19// $Author: fci $
20//
21// ------------------------------------------------------------------------
22
24
25// Class AbsFileStream
26// ------------------------------------------------------------------------
28// The source of tokens is an abstract file stream.
29
30class AbsFileStream : public TokenStream {
31public:
33 // Store stream name.
34 explicit AbsFileStream(const std::string& name);
35
36 virtual ~AbsFileStream();
37
39 virtual bool fillLine() = 0;
40
42 // Returns false when end of file is hit.
43 virtual Token readToken();
44
45protected:
46 // Read double from current statement.
48
49 // Read string value from current statement.
51
52 // Read word from current statement.
54
55 // Skip C-like comments.
56 bool skipComments();
57
58 // Current input line and position in line.
59 std::string line;
61
62private:
63 // Not implemented.
67};
68
69#endif // OPALX_AbsFileStream_HH
A stream of input tokens.
AbsFileStream(const AbsFileStream &)
void operator=(const AbsFileStream &)
std::string line
virtual bool fillLine()=0
Read next input line.
virtual ~AbsFileStream()
virtual Token readToken()
Read single token from file.
Abstract interface for a stream of input tokens.
Definition TokenStream.h:30
Representation of a single input token.
Definition Token.h:32