OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
AbsFileStream Class Referenceabstract

A stream of input tokens. More...

#include <AbsFileStream.h>

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

Public Member Functions

 AbsFileStream (const std::string &name)
 Constructor. More...
 
virtual ~AbsFileStream ()
 
virtual bool fillLine ()=0
 Read next input line. More...
 
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...
 

Protected Member Functions

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

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
 

Private Member Functions

 AbsFileStream ()
 
 AbsFileStream (const AbsFileStream &)
 
void operator= (const AbsFileStream &)
 

Detailed Description

A stream of input tokens.

Definition at line 31 of file AbsFileStream.h.

Constructor & Destructor Documentation

◆ AbsFileStream() [1/3]

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

Constructor.

Definition at line 31 of file AbsFileStream.cpp.

◆ ~AbsFileStream()

AbsFileStream::~AbsFileStream ( )
virtual

Definition at line 38 of file AbsFileStream.cpp.

◆ AbsFileStream() [2/3]

AbsFileStream::AbsFileStream ( )
private

◆ AbsFileStream() [3/3]

AbsFileStream::AbsFileStream ( const AbsFileStream )
private

Member Function Documentation

◆ fillLine()

virtual bool AbsFileStream::fillLine ( )
pure virtual

Read next input line.

Implemented in TerminalStream, and FileStream.

Referenced by readToken(), and skipComments().

◆ operator=()

void AbsFileStream::operator= ( const AbsFileStream )
private

◆ readNumber()

Token AbsFileStream::readNumber ( )
protected

Definition at line 144 of file AbsFileStream.cpp.

References curr_char, TokenStream::curr_line, Token::IS_ERROR, line, and TokenStream::stream_name.

Referenced by readToken().

◆ readString()

Token AbsFileStream::readString ( )
protected

◆ readToken()

Token AbsFileStream::readToken ( )
virtual

◆ readWord()

Token AbsFileStream::readWord ( )
protected

Definition at line 260 of file AbsFileStream.cpp.

References curr_char, TokenStream::curr_line, Token::IS_WORD, line, and TokenStream::stream_name.

Referenced by readToken().

◆ skipComments()

bool AbsFileStream::skipComments ( )
protected

Definition at line 278 of file AbsFileStream.cpp.

References curr_char, fillLine(), and line.

Referenced by readToken().

Here is the call graph for this function:

Member Data Documentation

◆ curr_char

int AbsFileStream::curr_char
protected

◆ line

std::string AbsFileStream::line
protected

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