ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        ctor
        deferred_resn
        demangler
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        memory
        new-ast
        new-ast-unique-expr
        new-env
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
        resolv-new
        with_gc
      
      
        
          | 
            Last change
 on this file since f96b061 was             27de955, checked in by Rob Schluntz <rschlunt@…>, 10 years ago           | 
        
        
          | 
             
fix multi-level exit code (labeled break and continue) 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            1016 bytes
           | 
        
      
      
| Rev | Line |   | 
|---|
| [51587aa] | 1 | //
 | 
|---|
 | 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
 | 
|---|
 | 3 | //
 | 
|---|
 | 4 | // The contents of this file are covered under the licence agreement in the
 | 
|---|
 | 5 | // file "LICENCE" distributed with Cforall.
 | 
|---|
 | 6 | //
 | 
|---|
| [a08ba92] | 7 | // LabelGenerator.h -- 
 | 
|---|
| [51587aa] | 8 | //
 | 
|---|
| [843054c2] | 9 | // Author           : Rodolfo G. Esteves
 | 
|---|
| [51587aa] | 10 | // Created On       : Mon May 18 07:44:20 2015
 | 
|---|
| [27de955] | 11 | // Last Modified By : Rob Schluntz
 | 
|---|
 | 12 | // Last Modified On : Wed Jun 03 14:16:26 2015
 | 
|---|
 | 13 | // Update Count     : 5
 | 
|---|
| [51587aa] | 14 | //
 | 
|---|
| [a08ba92] | 15 | 
 | 
|---|
| [51b73452] | 16 | #ifndef LABEL_GENERATOR_H
 | 
|---|
 | 17 | #define LABEL_GENERATOR_H
 | 
|---|
 | 18 | 
 | 
|---|
 | 19 | #include "SynTree/SynTree.h"
 | 
|---|
| [27de955] | 20 | #include <string>
 | 
|---|
| [51b73452] | 21 | 
 | 
|---|
 | 22 | namespace ControlStruct {
 | 
|---|
| [a08ba92] | 23 |         class LabelGenerator {
 | 
|---|
 | 24 |           public:
 | 
|---|
 | 25 |                 static LabelGenerator *getGenerator();
 | 
|---|
| [27de955] | 26 |                 Label newLabel(std::string suffix = "");
 | 
|---|
| [a08ba92] | 27 |                 void reset() { current = 0; }
 | 
|---|
 | 28 |                 void rewind() { current--; }
 | 
|---|
 | 29 |           protected:
 | 
|---|
 | 30 |                 LabelGenerator(): current(0) {}
 | 
|---|
 | 31 |           private:
 | 
|---|
 | 32 |                 int current;
 | 
|---|
 | 33 |                 static LabelGenerator *labelGenerator;
 | 
|---|
 | 34 |         };
 | 
|---|
| [51b73452] | 35 | } // namespace ControlStruct
 | 
|---|
 | 36 | 
 | 
|---|
| [d9a0e76] | 37 | #endif // LABEL_GENERATOR_H
 | 
|---|
| [51b73452] | 38 | 
 | 
|---|
| [51587aa] | 39 | // Local Variables: //
 | 
|---|
 | 40 | // tab-width: 4 //
 | 
|---|
 | 41 | // mode: c++ //
 | 
|---|
 | 42 | // compile-command: "make install" //
 | 
|---|
 | 43 | // End: //
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.