FAUST compiler  0.9.9.6b8
occurences.hh
Go to the documentation of this file.
00001 #ifndef __OCCURENCES__
00002 #define __OCCURENCES__
00003 
00004 #include "tlib.hh"
00005 
00006 
00007 class Occurences
00008 {
00009     const int   fXVariability;      
00010     int         fOccurences[4];     
00011     bool        fMultiOcc;          
00012     bool        fOutDelayOcc;       
00013     int         fMinDelay;          
00014     int         fMaxDelay;          
00015 
00016  public:
00017     Occurences(int v, int r);
00018 
00019     Occurences* incOccurences(int v, int r, int d); 
00020     
00021     bool        hasMultiOccurences() const;         
00022     bool        hasOutDelayOccurences() const;      
00023     int         getMaxDelay() const;                
00024     int         getMinDelay() const;                
00025 };
00026 
00027 
00032 class OccMarkup
00033 {
00034     Tree        fRootTree;                              
00035     Tree        fPropKey;                               
00036 
00037     void        incOcc (Tree env, int v, int r, int d, Tree t); 
00038     Occurences* getOcc (Tree t);                        
00039     void        setOcc (Tree t, Occurences* occ);       
00040 
00041  public:
00042     void        mark(Tree root);                        
00043     Occurences* retrieve(Tree t);                       
00044 };
00045 
00046 
00047 
00048 #endif