OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
StringStream Class Reference

A stream of input tokens. More...

#include <StringStream.h>

Inheritance diagram for StringStream:
Collaboration diagram for StringStream:

Public Member Functions

 StringStream (const std::string &s)
 Constructor.
virtual ~StringStream ()
virtual Token readToken ()
 Read single token from file.
void putBack (const Token &token)
 Put token back to stream.
const std::string & getName () const
 Return stream name.
int getLine () const
 Return line number.
int addReference () const
 Increment reference count.
int removeReference () const
 Decrement the reference count.
bool isShared () const
 Test for sharing.

Protected Attributes

std::string stream_name
int curr_line
bool put_back_flag
Token put_back

Private Member Functions

 StringStream ()
 StringStream (const StringStream &)
void operator= (const StringStream &)
Token readNumber ()
Token readString ()
Token readWord ()

Private Attributes

const std::string line_m
std::string::size_type currentChar_m
int refCount

Detailed Description

A stream of input tokens.

Definition at line 31 of file StringStream.h.

Constructor & Destructor Documentation

◆ StringStream() [1/3]

StringStream::StringStream ( const std::string & s)

Constructor.

Definition at line 31 of file StringStream.cpp.

References currentChar_m, line_m, and TokenStream::TokenStream().

Referenced by operator=(), and StringStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~StringStream()

StringStream::~StringStream ( )
virtual

Definition at line 38 of file StringStream.cpp.

◆ StringStream() [2/3]

StringStream::StringStream ( )
private

◆ StringStream() [3/3]

StringStream::StringStream ( const StringStream & )
private

References StringStream().

Here is the call graph for this function:

Member Function Documentation

◆ addReference()

int RCObject::addReference ( ) const
inlineinherited

Increment reference count.

Definition at line 83 of file RCObject.h.

References refCount.

Referenced by Pointer< Object >::operator=(), Pointer< Object >::operator=(), and Pointer< Object >::unique().

Here is the caller graph for this function:

◆ getLine()

int TokenStream::getLine ( ) const
inherited

Return line number.

Definition at line 49 of file TokenStream.cpp.

References curr_line.

◆ getName()

const std::string & TokenStream::getName ( ) const
inherited

Return stream name.

Definition at line 54 of file TokenStream.cpp.

References stream_name.

◆ isShared()

bool RCObject::isShared ( ) const
inlineinherited

Test for sharing.

Definition at line 93 of file RCObject.h.

References refCount.

◆ operator=()

void StringStream::operator= ( const StringStream & )
private

References StringStream().

Here is the call graph for this function:

◆ putBack()

void TokenStream::putBack ( const Token & token)
inherited

Put token back to stream.

Definition at line 38 of file TokenStream.cpp.

References put_back, and put_back_flag.

◆ readNumber()

Token StringStream::readNumber ( )
private

Definition at line 107 of file StringStream.cpp.

References currentChar_m, Token::IS_ERROR, and line_m.

Referenced by readToken().

Here is the caller graph for this function:

◆ readString()

Token StringStream::readString ( )
private

Definition at line 194 of file StringStream.cpp.

References currentChar_m, Token::IS_STRING, and line_m.

Referenced by readToken().

Here is the caller graph for this function:

◆ readToken()

Token StringStream::readToken ( )
virtual

Read single token from file.

Implements TokenStream.

Definition at line 42 of file StringStream.cpp.

References TokenStream::curr_line, currentChar_m, Token::IS_DELIMITER, Token::IS_EOF, Token::IS_ERROR, line_m, TokenStream::put_back, TokenStream::put_back_flag, readNumber(), readString(), readWord(), and TokenStream::stream_name.

Here is the call graph for this function:

◆ readWord()

Token StringStream::readWord ( )
private

Definition at line 222 of file StringStream.cpp.

References currentChar_m, Token::IS_WORD, and line_m.

Referenced by readToken().

Here is the caller graph for this function:

◆ removeReference()

int RCObject::removeReference ( ) const
inlineinherited

Decrement the reference count.

Definition at line 88 of file RCObject.h.

References refCount.

Member Data Documentation

◆ curr_line

◆ currentChar_m

std::string::size_type StringStream::currentChar_m
private

Definition at line 62 of file StringStream.h.

Referenced by readNumber(), readString(), readToken(), readWord(), and StringStream().

◆ line_m

const std::string StringStream::line_m
private

Definition at line 61 of file StringStream.h.

Referenced by readNumber(), readString(), readToken(), readWord(), and StringStream().

◆ put_back

Token TokenStream::put_back
protectedinherited

◆ put_back_flag

bool TokenStream::put_back_flag
protectedinherited

◆ refCount

int RCObject::refCount
mutableprivateinherited

Definition at line 76 of file RCObject.h.

Referenced by addReference(), isShared(), RCObject(), RCObject(), and removeReference().

◆ stream_name


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