OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
FileStream.h
Go to the documentation of this file.
1#ifndef OPALX_FileStream_HH
2#define OPALX_FileStream_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: FileStream.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: FileStream
13//
14// ------------------------------------------------------------------------
15// Class category: Parser
16// ------------------------------------------------------------------------
17//
18// $Date: 2000/03/27 09:32:37 $
19// $Author: fci $
20//
21// ------------------------------------------------------------------------
22
23#include <fstream>
25
26// Class FileStream
27// ------------------------------------------------------------------------
29// The source of tokens is a named disk file.
30
31class FileStream : public AbsFileStream {
32public:
34 // Open associated file.
35 explicit FileStream(const std::string& name);
36
38 // Close associated file.
39 virtual ~FileStream();
40
42 virtual bool fillLine();
43
45 // If [b]flag[/b] is true, the subsequent input lines are echoed to
46 // the standard error stream.
47 static void setEcho(bool flag);
48
50 static bool getEcho();
51
52private:
53 // Not implemented.
56 void operator=(const FileStream&);
57
58 // Current file stream.
59 std::ifstream is;
60
61 // Flag for statement echo.
62 static bool echoFlag;
63};
64
65#endif // OPALX_FileStream_HH
A stream of input tokens.
A stream of input tokens.
Definition FileStream.h:31
static bool getEcho()
Return echo flag.
std::ifstream is
Definition FileStream.h:59
virtual ~FileStream()
Destructor.
static void setEcho(bool flag)
Set echo flag.
FileStream(const FileStream &)
void operator=(const FileStream &)
static bool echoFlag
Definition FileStream.h:62
virtual bool fillLine()
Read next input line.