OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
MacroStream.h
Go to the documentation of this file.
1#ifndef CLASSIC_MacroStream_HH
2#define CLASSIC_MacroStream_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: MacroStream.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: MacroStream
13//
14// ------------------------------------------------------------------------
15//
16// $Date: 2000/03/27 09:33:43 $
17// $Author: Andreas Adelmann $
18//
19// ------------------------------------------------------------------------
20
21#include "Parser/TokenStream.h"
22#include "Parser/Token.h"
23#include <list>
24
25
26// Class MacroStream
27// ------------------------------------------------------------------------
29// This list of tokens stores a macro template or instantiation.
30
31class MacroStream: public TokenStream {
32
33public:
34
36 // Assign the macro name as a buffer name.
37 MacroStream(const std::string &);
38
39 virtual ~MacroStream();
40
42 void append(Token &);
43
45 virtual Token readToken();
46
48 void start();
49
50private:
51
52 // Not implemented.
55 void operator=(const MacroStream &);
56
57 // The list of tokens.
58 typedef std::list<Token> TokenList;
60 TokenList::iterator curr;
61};
62
63#endif // CLASSIC_MacroStream_HH
Representation of a single input token.
Definition Token.h:33
TokenStream(const std::string &name)
Constructor.
TokenList::iterator curr
Definition MacroStream.h:60
virtual ~MacroStream()
void append(Token &)
Append a token to the stream.
MacroStream(const MacroStream &)
void operator=(const MacroStream &)
void start()
Reset stream to start.
std::list< Token > TokenList
Definition MacroStream.h:58
TokenList body
Definition MacroStream.h:59
MacroStream(const std::string &)
Constructor.
virtual Token readToken()
Read a token from the stream.