OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
A stream of input tokens. More...
#include <AbsFileStream.h>
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 |
RCObject & | operator= (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 &) |
A stream of input tokens.
Definition at line 31 of file AbsFileStream.h.
|
explicit |
Constructor.
Definition at line 31 of file AbsFileStream.cpp.
|
virtual |
Definition at line 38 of file AbsFileStream.cpp.
|
private |
|
private |
|
pure virtual |
Read next input line.
Implemented in TerminalStream, and FileStream.
Referenced by readToken(), and skipComments().
|
private |
|
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().
|
protected |
Definition at line 232 of file AbsFileStream.cpp.
References curr_char, TokenStream::curr_line, Token::IS_ERROR, Token::IS_STRING, line, and TokenStream::stream_name.
Referenced by readToken().
|
virtual |
Read single token from file.
Implements TokenStream.
Definition at line 42 of file AbsFileStream.cpp.
References curr_char, TokenStream::curr_line, fillLine(), Token::IS_DELIMITER, Token::IS_EOF, Token::IS_ERROR, line, TokenStream::put_back, TokenStream::put_back_flag, readNumber(), readString(), readWord(), skipComments(), and TokenStream::stream_name.
|
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().
|
protected |
Definition at line 278 of file AbsFileStream.cpp.
References curr_char, fillLine(), and line.
Referenced by readToken().
|
protected |
Definition at line 64 of file AbsFileStream.h.
Referenced by FileStream::fillLine(), TerminalStream::fillLine(), readNumber(), readString(), readToken(), readWord(), and skipComments().
|
protected |
Definition at line 63 of file AbsFileStream.h.
Referenced by FileStream::fillLine(), TerminalStream::fillLine(), readNumber(), readString(), readToken(), readWord(), and skipComments().