oaRegionQuery.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaRegionQuery.h
00004 //
00005 // This file contains the definitions for the public regionQuery classes. These
00006 // classes implement functionality to query a specified region in a design
00007 // hierarchy and quickly return objects of a specified type that overlap the
00008 // region. These classes are all abstract; applications must derive their own
00009 // sub-classes to use them. The classes implemented include:
00010 //
00011 //  oaRegionQuery
00012 //      This is the common base class for all types of query objects.
00013 //
00014 // Derived query classes for specific types of figures include:
00015 //      oaBlockageQuery
00016 //      oaBoundaryQuery
00017 //      oaFigGroupQuery
00018 //      oaGuideQuery
00019 //      oaInstQuery
00020 //      oaLayerRangeBlockageQuery
00021 //      oaMarkerQuery
00022 //      oaPlacementBlockageQuery
00023 //      oaRowQuery 
00024 //      oaShapeQuery
00025 //      oaSteinerQuery
00026 //      oaViaQuery
00027 //
00028 // *****************************************************************************
00029 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00030 // Integration Initiative, this material may not be copied, modified,
00031 // re-published, uploaded, executed, or distributed in any way, in any medium,
00032 // in whole or in part, without prior written permission from Cadence.
00033 //
00034 //                Copyright 2003-2005 Cadence Design Systems, Inc.
00035 //                           All Rights Reserved.
00036 //
00037 //  $Author: icftcm $
00038 //  $Revision: #1 $
00039 //  $Date: 2010/08/09 $
00040 //  $State: Exp $
00041 // *****************************************************************************
00042 // *****************************************************************************
00043 
00044 
00045 
00046 #if !defined(oaRegionQuery_P)
00047 #define oaRegionQuery_P
00048 
00049 
00050 
00051 // *****************************************************************************
00052 // Nested includes
00053 // *****************************************************************************
00054 #include "oaVia.h"
00055 #include "oaGuide.h"
00056 #include "oaRow.h"
00057 #include "oaMarker.h"
00058 #include "oaBoundary.h"
00059 #include "oaBlockage.h"
00060 #include "oaSteiner.h"
00061 #include "oaOccShape.h"
00062 #include "oaFigGroup.h"
00063 
00064 
00065 
00066 // *****************************************************************************
00067 // Declare and define types in the OpenAccess namespace.
00068 // *****************************************************************************
00069 BEGIN_OA_NAMESPACE
00070 
00071 class IRegionQueryPlugMgr;
00072 
00073 
00074 
00075 // *****************************************************************************
00076 // oaRegionQuery
00077 // *****************************************************************************
00078 class OA_DESIGN_DLL_API oaRegionQuery {
00079 public:
00080     virtual                     ~oaRegionQuery();       
00081     const oaDesign              *getTopDesign() const;
00082     const oaBox                 &getRegion() const;
00083     const oaTransform           &getCurrentTransform() const;
00084     const oaBox                 &getCurrentRegion() const;
00085     void                        getHierPath(oaHierPath &hierPath) const;
00086     oaDist                      getFilterSize() const;
00087     oaUInt4                     getStartLevel() const;
00088     oaUInt4                     getStopLevel() const;
00089 
00090     void                        abort();
00091 
00092     virtual oaBoolean           startRef(oaRef      *ref,
00093                                          oaUInt4    row = 0,
00094                                          oaUInt4    col = 0);
00095     virtual void                endRef(oaRef    *ref,
00096                                        oaUInt4  row = 0,
00097                                        oaUInt4  col = 0);
00098 
00099     static void                 init(const oaString &plugInName);
00100     static void                 getPlugInName(oaString &plugInName);
00101     static IRegionQueryPlugMgr  *getMgr();
00102 
00103 protected:
00104                                 oaRegionQuery();
00105                                 oaRegionQuery(const oaRegionQuery &);
00106 
00107     static IRegionQueryPlugMgr  *rqMgr;
00108     oaRegionQueryPvt            *pvt;
00109 
00110     friend class oaBlockTbl;
00111 
00112 private:
00113     oaRegionQuery               &operator=(const oaRegionQuery &);
00114 };
00115 
00116 
00117 
00118 // *****************************************************************************
00119 // oaBlockageQuery
00120 // *****************************************************************************
00121 class OA_DESIGN_DLL_API oaBlockageQuery : public oaRegionQuery {
00122 public:
00123                             oaBlockageQuery();
00124 
00125     oaLayerNum              getLayerNum() const;
00126 
00127     void                    query(oaDesign      *topDesign,
00128                                   oaLayerNum    layerNum,
00129                                   const oaBox   &region,
00130                                   oaDist        filterSize = 0,
00131                                   oaUInt4       startLevel = 0,
00132                                   oaUInt4       stopLevel = 100);
00133     void                    query(oaDesign      *topDesign,
00134                                   const oaBox   &region,
00135                                   oaDist        filterSize = 0,
00136                                   oaUInt4       startLevel = 0,
00137                                   oaUInt4       stopLevel = 100);
00138     void                    query(oaDesign          *topDesign,
00139                                   oaLayerNum        layerNum,
00140                                   const oaBox       &region,
00141                                   const oaTransform &xform,
00142                                   oaDist            filterSize = 0,
00143                                   oaUInt4           startLevel = 0,
00144                                   oaUInt4           stopLevel = 100);
00145     void                    query(oaDesign          *topDesign,
00146                                   const oaBox       &region,
00147                                   const oaTransform &xform,
00148                                   oaDist            filterSize = 0,
00149                                   oaUInt4           startLevel = 0,
00150                                   oaUInt4           stopLevel = 100);
00151 
00152 
00153     virtual void            queryBlockage(oaBlockage *blockage) = 0;
00154     virtual void            queryPlacementBlockage(oaBlockage *blockage) = 0;
00155 };
00156 
00157 
00158 
00159 // *****************************************************************************
00160 // oaBoundaryQuery
00161 // *****************************************************************************
00162 class OA_DESIGN_DLL_API oaBoundaryQuery : public oaRegionQuery {
00163 public:
00164                             oaBoundaryQuery();
00165 
00166     void                    query(oaDesign      *topDesign,
00167                                   const oaBox   &region,
00168                                   oaDist        filterSize = 0,
00169                                   oaUInt4       startLevel = 0,
00170                                   oaUInt4       stopLevel = 100);
00171     void                    query(oaDesign          *topDesign,
00172                                   const oaBox       &region,
00173                                   const oaTransform &xform,
00174                                   oaDist            filterSize = 0,
00175                                   oaUInt4           startLevel = 0,
00176                                   oaUInt4           stopLevel = 100);
00177 
00178 
00179     virtual void            queryBoundary(oaBoundary *boundary) = 0;
00180 };
00181 
00182 
00183 
00184 // *****************************************************************************
00185 // oaFigGroupQuery
00186 // *****************************************************************************
00187 class OA_DESIGN_DLL_API oaFigGroupQuery : public oaRegionQuery {
00188 public:
00189                             oaFigGroupQuery();
00190 
00191     void                    query(oaDesign      *topDesign,
00192                                   const oaBox   &region,
00193                                   oaDist        filterSize = 0,
00194                                   oaUInt4       startLevel = 0,
00195                                   oaUInt4       stopLevel = 100);
00196     void                    query(oaDesign          *topDesign,
00197                                   const oaBox       &region,
00198                                   const oaTransform &xform,
00199                                   oaDist            filterSize = 0,
00200                                   oaUInt4           startLevel = 0,
00201                                   oaUInt4           stopLevel = 100);
00202 
00203     virtual void            queryFigGroup(oaFigGroup *figGroup) = 0;
00204 };
00205 
00206 
00207 
00208 // *****************************************************************************
00209 // oaGuideQuery
00210 // *****************************************************************************
00211 class OA_DESIGN_DLL_API oaGuideQuery : public oaRegionQuery {
00212 public:
00213                             oaGuideQuery();
00214 
00215     void                    query(oaDesign      *topDesign,
00216                                   const oaBox   &region,
00217                                   oaDist        filterSize = 0,
00218                                   oaUInt4       startLevel = 0,
00219                                   oaUInt4       stopLevel = 100);
00220     void                    query(oaDesign          *topDesign,
00221                                   const oaBox       &region,
00222                                   const oaTransform &xform,
00223                                   oaDist            filterSize = 0,
00224                                   oaUInt4           startLevel = 0,
00225                                   oaUInt4           stopLevel = 100);
00226 
00227 
00228     virtual void            queryGuide(oaGuide *guide) = 0;
00229 };
00230 
00231 
00232 
00233 // *****************************************************************************
00234 // oaInstQuery
00235 // *****************************************************************************
00236 class OA_DESIGN_DLL_API oaInstQuery : public oaRegionQuery {
00237 public:
00238                             oaInstQuery();
00239 
00240     void                    query(oaDesign      *topDesign,
00241                                   const oaBox   &region,
00242                                   oaDist        filterSize = 0,
00243                                   oaUInt4       startLevel = 0,
00244                                   oaUInt4       stopLevel = 100);
00245     void                    query(oaDesign          *topDesign,
00246                                   const oaBox       &region,
00247                                   const oaTransform &xform,
00248                                   oaDist            filterSize = 0,
00249                                   oaUInt4           startLevel = 0,
00250                                   oaUInt4           stopLevel = 100);
00251 
00252     virtual void            queryInst(oaInst *inst) = 0;
00253 };
00254 
00255 
00256 
00257 // *****************************************************************************
00258 // oaLayerRangeBlockageQuery
00259 // *****************************************************************************
00260 class OA_DESIGN_DLL_API oaLayerRangeBlockageQuery : public oaRegionQuery {
00261 public:
00262                             oaLayerRangeBlockageQuery();
00263 
00264     void                    query(oaDesign      *topDesign,
00265                                   const oaBox   &region,
00266                                   oaDist        filterSize = 0,
00267                                   oaUInt4       startLevel = 0,
00268                                   oaUInt4       stopLevel = 100);
00269     void                    query(oaDesign          *topDesign,
00270                                   const oaBox       &region,
00271                                   const oaTransform &xform,
00272                                   oaDist            filterSize = 0,
00273                                   oaUInt4           startLevel = 0,
00274                                   oaUInt4           stopLevel = 100);
00275 
00276 
00277     virtual void            queryBlockage(oaBlockage *blockage) = 0;
00278 };
00279 
00280 
00281 
00282 // *****************************************************************************
00283 // oaMarkerQuery
00284 // *****************************************************************************
00285 class OA_DESIGN_DLL_API oaMarkerQuery : public oaRegionQuery {
00286 public:
00287                             oaMarkerQuery();
00288 
00289     void                    query(oaDesign      *topDesign,
00290                                   const oaBox   &region,
00291                                   oaDist        filterSize = 0,
00292                                   oaUInt4       startLevel = 0,
00293                                   oaUInt4       stopLevel = 100);
00294     void                    query(oaDesign          *topDesign,
00295                                   const oaBox       &region,
00296                                   const oaTransform &xform,
00297                                   oaDist            filterSize = 0,
00298                                   oaUInt4           startLevel = 0,
00299                                   oaUInt4           stopLevel = 100);
00300 
00301     virtual void            queryMarker(oaMarker *marker) = 0;
00302 };
00303 
00304 
00305 
00306 // *****************************************************************************
00307 // oaPlacementBlockageQuery
00308 // *****************************************************************************
00309 class OA_DESIGN_DLL_API oaPlacementBlockageQuery : public oaRegionQuery {
00310 public:
00311                             oaPlacementBlockageQuery();
00312 
00313     void                    query(oaDesign      *topDesign,
00314                                   const oaBox   &region,
00315                                   oaDist        filterSize = 0,
00316                                   oaUInt4       startLevel = 0,
00317                                   oaUInt4       stopLevel = 100);
00318     void                    query(oaDesign          *topDesign,
00319                                   const oaBox       &region,
00320                                   const oaTransform &xform,
00321                                   oaDist            filterSize = 0,
00322                                   oaUInt4           startLevel = 0,
00323                                   oaUInt4           stopLevel = 100);
00324 
00325 
00326     virtual void            queryBlockage(oaBlockage *blockage) = 0;
00327 };
00328 
00329 
00330 
00331 // *****************************************************************************
00332 // oaRowQuery
00333 // *****************************************************************************
00334 class OA_DESIGN_DLL_API oaRowQuery : public oaRegionQuery {
00335 public:
00336                             oaRowQuery();
00337 
00338     void                    query(oaDesign      *topDesign,
00339                                   const oaBox   &region,
00340                                   oaDist        filterSize = 0,
00341                                   oaUInt4       startLevel = 0,
00342                                   oaUInt4       stopLevel = 100);
00343     void                    query(oaDesign          *topDesign,
00344                                   const oaBox       &region,
00345                                   const oaTransform &xform,
00346                                   oaDist            filterSize = 0,
00347                                   oaUInt4           startLevel = 0,
00348                                   oaUInt4           stopLevel = 100);
00349 
00350 
00351     virtual void            queryRow(oaRow *row) = 0;
00352 };
00353 
00354 
00355 
00356 // *****************************************************************************
00357 // oaShapeQuery
00358 // *****************************************************************************
00359 class OA_DESIGN_DLL_API oaShapeQuery : public oaRegionQuery {
00360 public:
00361                             oaShapeQuery();
00362 
00363     oaLayerNum              getLayerNum() const;
00364     oaPurposeNum            getPurposeNum() const;
00365 
00366     void                    query(oaDesign      *topDesign,
00367                                   oaLayerNum    layerNum,
00368                                   oaPurposeNum  purposeNum,
00369                                   const oaBox   &region,
00370                                   oaDist        filterSize = 0,
00371                                   oaUInt4       startLevel = 0,
00372                                   oaUInt4       stopLevel = 100);
00373     void                    query(oaDesign          *topDesign,
00374                                   oaLayerNum        layerNum,
00375                                   oaPurposeNum      purposeNum,
00376                                   const oaBox       &region,
00377                                   const oaTransform &xform,
00378                                   oaDist            filterSize = 0,
00379                                   oaUInt4           startLevel = 0,
00380                                   oaUInt4           stopLevel = 100);
00381 
00382     oaOccShape              *getOccShape(oaShape *shape) const;
00383 
00384     virtual void            queryShape(oaShape *shape) = 0;
00385 };
00386 
00387 
00388 
00389 // *****************************************************************************
00390 // oaSteinerQuery
00391 // *****************************************************************************
00392 class OA_DESIGN_DLL_API oaSteinerQuery : public oaRegionQuery {
00393 public:
00394                             oaSteinerQuery();
00395 
00396     oaLayerNum              getLayerNum() const;
00397 
00398     void                    query(oaDesign      *topDesign,
00399                                   oaLayerNum    layerNum,
00400                                   const oaBox   &region,
00401                                   oaDist        filterSize = 0,
00402                                   oaUInt4       startLevel = 0,
00403                                   oaUInt4       stopLevel = 100);
00404     void                    query(oaDesign      *topDesign,
00405                                   const oaBox   &region,
00406                                   oaDist        filterSize = 0,
00407                                   oaUInt4       startLevel = 0,
00408                                   oaUInt4       stopLevel = 100);
00409 
00410     void                    query(oaDesign          *topDesign,
00411                                   oaLayerNum        layerNum,
00412                                   const oaBox       &region,
00413                                   const oaTransform &xform,
00414                                   oaDist            filterSize = 0,
00415                                   oaUInt4           startLevel = 0,
00416                                   oaUInt4           stopLevel = 100);
00417     void                    query(oaDesign          *topDesign,
00418                                   const oaBox       &region,
00419                                   const oaTransform &xform,
00420                                   oaDist            filterSize = 0,
00421                                   oaUInt4           startLevel = 0,
00422                                   oaUInt4           stopLevel = 100);
00423 
00424     virtual void            querySteiner(oaSteiner *steiner) = 0;
00425 };
00426 
00427 
00428 
00429 // *****************************************************************************
00430 // oaViaQuery
00431 // *****************************************************************************
00432 class OA_DESIGN_DLL_API oaViaQuery : public oaRegionQuery {
00433 public:
00434                             oaViaQuery();
00435 
00436     oaLayerNum              getLayerNum1() const;
00437     oaLayerNum              getLayerNum2() const;
00438 
00439     void                    query(oaDesign      *topDesign,
00440                                   const oaBox   &region,
00441                                   oaDist        filterSize = 0,
00442                                   oaUInt4       startLevel = 0,
00443                                   oaUInt4       stopLevel = 100);
00444     void                    query(oaDesign      *topDesign,
00445                                   oaLayerNum    layerNum,
00446                                   const oaBox   &region,
00447                                   oaDist        filterSize = 0,
00448                                   oaUInt4       startLevel = 0,
00449                                   oaUInt4       stopLevel = 100);
00450     void                    query(oaDesign      *topDesign,
00451                                   oaLayerNum    layerNum1,
00452                                   oaLayerNum    layerNum2,
00453                                   const oaBox   &region,
00454                                   oaDist        filterSize = 0,
00455                                   oaUInt4       startLevel = 0,
00456                                   oaUInt4       stopLevel = 100);
00457 
00458     void                    query(oaDesign          *topDesign,
00459                                   const oaBox       &region,
00460                                   const oaTransform &xform,
00461                                   oaDist            filterSize = 0,
00462                                   oaUInt4           startLevel = 0,
00463                                   oaUInt4           stopLevel = 100);
00464     void                    query(oaDesign          *topDesign,
00465                                   oaLayerNum        layerNum,
00466                                   const oaBox       &region,
00467                                   const oaTransform &xform,
00468                                   oaDist            filterSize = 0,
00469                                   oaUInt4           startLevel = 0,
00470                                   oaUInt4           stopLevel = 100);
00471     void                    query(oaDesign          *topDesign,
00472                                   oaLayerNum        layerNum1,
00473                                   oaLayerNum        layerNum2,
00474                                   const oaBox       &region,
00475                                   const oaTransform &xform,
00476                                   oaDist            filterSize = 0,
00477                                   oaUInt4           startLevel = 0,
00478                                   oaUInt4           stopLevel = 100);
00479 
00480     virtual void            queryVia(oaVia *via) = 0;
00481 };
00482 
00483 
00484 
00485 END_OA_NAMESPACE
00486 
00487 #endif

Return to top of page