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

An input buffer for macro commands. More...

#include <MacroStream.h>

Inheritance diagram for MacroStream:
Collaboration diagram for MacroStream:

Public Member Functions

 MacroStream (const std::string &)
 Constructor.
virtual ~MacroStream ()
void append (Token &)
 Append a token to the stream.
virtual Token readToken ()
 Read a token from the stream.
void start ()
 Reset stream to start.
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 Types

typedef std::list< TokenTokenList

Private Member Functions

 MacroStream ()
 MacroStream (const MacroStream &)
void operator= (const MacroStream &)

Private Attributes

TokenList body
TokenList::iterator curr
int refCount

Detailed Description

An input buffer for macro commands.

Definition at line 31 of file MacroStream.h.

Member Typedef Documentation

◆ TokenList

typedef std::list<Token> MacroStream::TokenList
private

Definition at line 58 of file MacroStream.h.

Constructor & Destructor Documentation

◆ MacroStream() [1/3]

MacroStream::MacroStream ( const std::string & macName)

Constructor.

Definition at line 27 of file MacroStream.cpp.

References begin(), body, curr, and TokenStream::TokenStream().

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

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

◆ ~MacroStream()

MacroStream::~MacroStream ( )
virtual

Definition at line 32 of file MacroStream.cpp.

◆ MacroStream() [2/3]

MacroStream::MacroStream ( )
private

◆ MacroStream() [3/3]

MacroStream::MacroStream ( const MacroStream & )
private

References MacroStream().

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:

◆ append()

void MacroStream::append ( Token & token)

Append a token to the stream.

Definition at line 36 of file MacroStream.cpp.

References body.

Referenced by MacroCmd::makeInstance(), SequenceTemplate::makeInstance(), and MacroCmd::makeTemplate().

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 MacroStream::operator= ( const MacroStream & )
private

References MacroStream().

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.

◆ readToken()

Token MacroStream::readToken ( )
virtual

Read a token from the stream.

Implements TokenStream.

Definition at line 41 of file MacroStream.cpp.

References body, curr, Token::IS_EOF, TokenStream::put_back, TokenStream::put_back_flag, and TokenStream::stream_name.

◆ removeReference()

int RCObject::removeReference ( ) const
inlineinherited

Decrement the reference count.

Definition at line 88 of file RCObject.h.

References refCount.

◆ start()

void MacroStream::start ( )

Reset stream to start.

Definition at line 53 of file MacroStream.cpp.

References body, curr, and TokenStream::put_back_flag.

Referenced by SequenceTemplate::makeInstance().

Here is the caller graph for this function:

Member Data Documentation

◆ body

TokenList MacroStream::body
private

Definition at line 59 of file MacroStream.h.

Referenced by append(), MacroStream(), readToken(), and start().

◆ curr

TokenList::iterator MacroStream::curr
private

Definition at line 60 of file MacroStream.h.

Referenced by MacroStream(), readToken(), and start().

◆ curr_line

◆ 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: