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

A stream of input tokens. More...

#include <StringStream.h>

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

Public Member Functions

 StringStream (const std::string &s)
 Constructor. More...
 
virtual ~StringStream ()
 
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...
 

Private Member Functions

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

Private Attributes

const std::string line
 
std::string::size_type curr_char
 

Additional Inherited Members

- 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 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 31 of file StringStream.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 32 of file StringStream.cpp.

StringStream::~StringStream ( )
virtual

Definition at line 39 of file StringStream.cpp.

StringStream::StringStream ( )
private
StringStream::StringStream ( const StringStream )
private

Member Function Documentation

void StringStream::operator= ( const StringStream )
private
Token StringStream::readNumber ( )
private

Definition at line 108 of file StringStream.cpp.

References curr_char, Token::IS_ERROR, and line.

Referenced by readToken().

Token StringStream::readString ( )
private

Definition at line 195 of file StringStream.cpp.

References curr_char, Token::IS_STRING, and line.

Referenced by readToken().

Token StringStream::readToken ( )
virtual

Read single token from file.

Implements TokenStream.

Definition at line 43 of file StringStream.cpp.

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

Here is the call graph for this function:

Token StringStream::readWord ( )
private

Definition at line 223 of file StringStream.cpp.

References curr_char, Token::IS_WORD, and line.

Referenced by readToken().

Member Data Documentation

std::string::size_type StringStream::curr_char
private

Definition at line 62 of file StringStream.h.

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

const std::string StringStream::line
private

Definition at line 61 of file StringStream.h.

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


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