OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
FileStream Class Reference

A stream of input tokens. More...

#include <FileStream.h>

Inheritance diagram for FileStream:
Inheritance graph
[legend]
Collaboration diagram for FileStream:
Collaboration graph
[legend]

Public Member Functions

 FileStream (const std::string &name)
 Constructor. More...
 
virtual ~FileStream ()
 Destructor. More...
 
virtual bool fillLine ()
 Read next input line. More...
 
- Public Member Functions inherited from AbsFileStream
 AbsFileStream (const std::string &name)
 Constructor. More...
 
virtual ~AbsFileStream ()
 
virtual Token readToken ()
 Read single token from file. More...
 
- Public Member Functions inherited from TokenStream
 TokenStream (const std::string &name)
 Constructor. More...
 
virtual ~TokenStream ()
 
void putBack (const Token &token)
 Put token back to stream. More...
 
const std::string & getName () const
 Return stream name. More...
 
int getLine () const
 Return line number. More...
 
- Public Member Functions inherited from RCObject
int addReference () const
 Increment reference count. More...
 
int removeReference () const
 Decrement the reference count. More...
 
bool isShared () const
 Test for sharing. More...
 

Static Public Member Functions

static void setEcho (bool flag)
 Set echo flag. More...
 
static bool getEcho ()
 Return echo flag. More...
 

Private Member Functions

 FileStream ()
 
 FileStream (const FileStream &)
 
void operator= (const FileStream &)
 

Private Attributes

std::ifstream is
 

Static Private Attributes

static bool echoFlag = false
 

Additional Inherited Members

- Protected Member Functions inherited from AbsFileStream
Token readNumber ()
 
Token readString ()
 
Token readWord ()
 
bool skipComments ()
 
- Protected Member Functions inherited from RCObject
 RCObject ()
 Default constructor. More...
 
 RCObject (const RCObject &)
 Copy constructor. More...
 
virtual ~RCObject ()=0
 
RCObjectoperator= (const RCObject &right)
 
- Protected Attributes inherited from AbsFileStream
std::string line
 
int curr_char
 
- Protected Attributes inherited from TokenStream
std::string stream_name
 
int curr_line
 
bool put_back_flag
 
Token put_back
 

Detailed Description

A stream of input tokens.

Definition at line 32 of file FileStream.h.

Constructor & Destructor Documentation

◆ FileStream() [1/3]

FileStream::FileStream ( const std::string &  name)
explicit

Constructor.

Definition at line 33 of file FileStream.cpp.

References is, and name.

◆ ~FileStream()

FileStream::~FileStream ( )
virtual

Destructor.

Definition at line 43 of file FileStream.cpp.

◆ FileStream() [2/3]

FileStream::FileStream ( )
private

◆ FileStream() [3/3]

FileStream::FileStream ( const FileStream )
private

Member Function Documentation

◆ fillLine()

bool FileStream::fillLine ( )
virtual

Read next input line.

Implements AbsFileStream.

Definition at line 57 of file FileStream.cpp.

References AbsFileStream::curr_char, TokenStream::curr_line, echoFlag, is, AbsFileStream::line, IpplInfo::myNode(), and TokenStream::stream_name.

Here is the call graph for this function:

◆ getEcho()

bool FileStream::getEcho ( )
static

Return echo flag.

Definition at line 52 of file FileStream.cpp.

References echoFlag.

◆ operator=()

void FileStream::operator= ( const FileStream )
private

◆ setEcho()

void FileStream::setEcho ( bool  flag)
static

Set echo flag.

Definition at line 47 of file FileStream.cpp.

References echoFlag.

Referenced by Option::execute(), main(), and Option::Option().

Member Data Documentation

◆ echoFlag

bool FileStream::echoFlag = false
staticprivate

Definition at line 66 of file FileStream.h.

Referenced by fillLine(), getEcho(), and setEcho().

◆ is

std::ifstream FileStream::is
private

Definition at line 63 of file FileStream.h.

Referenced by FileStream(), and fillLine().


The documentation for this class was generated from the following files: