ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since 42dcae7 was
51b7345,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
initial commit
|
-
Property mode set to
100644
|
File size:
518 bytes
|
Line | |
---|
1 | #ifndef LABEL_GENERATOR_H |
---|
2 | #define LABEL_GENERATOR_H |
---|
3 | |
---|
4 | #include "SynTree/SynTree.h" |
---|
5 | |
---|
6 | namespace ControlStruct { |
---|
7 | |
---|
8 | class LabelGenerator |
---|
9 | { |
---|
10 | public: |
---|
11 | static LabelGenerator *getGenerator(); |
---|
12 | Label newLabel(); |
---|
13 | void reset() { current = 0; } |
---|
14 | void rewind() { current--; } |
---|
15 | |
---|
16 | protected: |
---|
17 | LabelGenerator(): current(0) {} |
---|
18 | |
---|
19 | private: |
---|
20 | int current; |
---|
21 | static LabelGenerator *labelGenerator; |
---|
22 | }; |
---|
23 | |
---|
24 | } // namespace ControlStruct |
---|
25 | |
---|
26 | #endif // #ifndef LABEL_GENERATOR_H |
---|
27 | |
---|
28 | /* |
---|
29 | Local Variables: |
---|
30 | mode: c++ |
---|
31 | End: |
---|
32 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.