oaOccTraverser.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaOccTraverser.h
00004 //
00005 // This file contains the declaration for the oaOccTraverser class. This class
00006 // implements a hierarchical traversal for connectivity objects in the
00007 // occurrence domain. Capabilities it supports include:
00008 //
00009 // 1)   oaOccTraverser is not an abstract class. Applications can create their 
00010 //      own sub-class in order to provide specific functionality.
00011 // 2)   A traverse() method initiates the traversal.
00012 // 3)   The flags() method and a set of flag bits enable the applications to
00013 //      control the traversal.
00014 // 4)   The virtual functions process*() inherited from the producer are called 
00015 //      for connectivity objects of a specific type.
00016 // 5)   The virtual function startInst() is called just before the contents of
00017 //      an instance in the hierarchy are produced. The caller can override this
00018 //      function, and return a boolean indicating whether or not the traversal 
00019 //      should descend into the instance's master.The default implementation 
00020 //      returns true, which means the traversal should descend into the 
00021 //      instance's master.
00022 // 6)   The virtual function endInst() is called just after the contents of
00023 //      an instance's master in the hierarchy have been produced.
00024 //
00025 // *****************************************************************************
00026 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00027 // Integration Initiative, this material may not be copied, modified,
00028 // re-published, uploaded, executed, or distributed in any way, in any medium,
00029 // in whole or in part, without prior written permission from Cadence.
00030 //
00031 //                Copyright 2003-2010 Cadence Design Systems, Inc.
00032 //                           All Rights Reserved.
00033 //
00034 //  $Author: icftcm $
00035 //  $Revision: #1 $
00036 //  $Date: 2010/08/09 $
00037 //  $State: Exp $
00038 // *****************************************************************************
00039 // *****************************************************************************
00040 
00041 
00042 
00043 #if !defined(oaOccTraverser_P)
00044 #define oaOccTraverser_P
00045 
00046 
00047 
00048 // *****************************************************************************
00049 // Nested includes
00050 // *****************************************************************************
00051 #include "oaOccVectorInstDef.h"
00052 #include "oaOccInstHeader.h"
00053 #include "oaOccModuleInstHeader.h"
00054 #include "oaOccBusNetDef.h"
00055 #include "oaOccInstTerm.h"
00056 #include "oaOccBusTermDef.h"
00057 #include "oaOccConnectDef.h"
00058 #include "oaOccAssignment.h"
00059 #include "oaOccProducer.h"
00060 
00061 
00062 
00063 // *****************************************************************************
00064 // Declare and define types in the OpenAccess namespace.
00065 // *****************************************************************************
00066 BEGIN_OA_NAMESPACE
00067 
00068 
00069 
00070 // *****************************************************************************
00071 // The following flag bits are used for the traversal control flag.
00072 // *****************************************************************************
00073 #define oavOccTraversePostOrderShift    0
00074 #define oavOccTraverseDesignsShift      1
00075 #define oavOccTraverseImplicitShift     2
00076 
00077 #define oavOccTraversePostOrder         (1 << oavOccTraversePostOrderShift)
00078 #define oavOccTraverseDesigns           (1 << oavOccTraverseDesignsShift)
00079 #define oavOccTraverseImplicit          (1 << oavOccTraverseImplicitShift)
00080 
00081 #define oavOccTraverseDefault           0
00082 
00083 
00084 
00085 // *****************************************************************************
00086 // oaOccTraverser
00087 // *****************************************************************************
00088 class OA_DESIGN_DLL_API oaOccTraverser : public oaOccProducer {
00089 public:
00090                             oaOccTraverser(oaOccurrence *topOcc);
00091                             ~oaOccTraverser();
00092 
00093     oaUInt4                 &flags();
00094 
00095     const oaOccurrence      *getTopOccurrence() const;
00096 
00097     void                    traverse();
00098     void                    abort();
00099 
00100     virtual oaBoolean       startInst(oaOccInst *inst);
00101     virtual void            endInst(oaOccInst *inst);
00102     virtual oaBoolean       startOccurrence(oaOccurrence *occ);
00103     virtual void            endOccurrence(oaOccurrence *occ);
00104 
00105 private:
00106     oaUInt4                 flagsVal;
00107 };
00108 
00109 
00110 
00111 
00112 END_OA_NAMESPACE
00113 
00114 #endif

Return to top of page