oaRevisionTraits.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaRevisionTraits.h
00004 // 
00005 // This file contains the definitions of the oaRevisionTraits<> template class
00006 // and the specializations. These classes help OpenAccess to support different 
00007 // versions of the interface to the oaObserver objects. 
00008 //
00009 // Several enums are defined in the Traits:
00010 //
00011 //   observerRevision: current default observer revision for type T.
00012 //   scopedObserverRevision: observer revision which adds the scoped 
00013 //                           notifications for type T.
00014 //   minObserverVersion{N}APIMinorRev: API minor revision at which Version-N 
00015 //                                   (N = 1,2...) Observer of type T is defined.
00016 //   minObserverVersion2BranchAPIRev: not used in Production branch.
00017 //   minObserverVersion2SelfAPIRev: not used in Production branch.
00018 //
00019 // *****************************************************************************
00020 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00021 // Integration Initiative, this material may not be copied, modified,
00022 // re-published, uploaded, executed, or distributed in any way, in any medium
00023 // in whole or in part, without prior written permission from Cadence.
00024 //
00025 //                Copyright 2003-2008 Cadence Design Systems, Inc.
00026 //                             All Rights Reserved.
00027 //
00028 //  $Author: $
00029 //  $Revision: $
00030 //  $Date: $
00031 //  $State: $
00032 // *****************************************************************************
00033 // *****************************************************************************
00034 
00035 
00036 
00037 #if !defined(oaRevisionTraits_P)
00038 #define oaRevisionTraits_P
00039 
00040 
00041 
00042 // *****************************************************************************
00043 // Nested includes
00044 // *****************************************************************************
00045 #include "oaBaseTypes.h"
00046 
00047 
00048 
00049 // *****************************************************************************
00050 // Declare and define types in the OpenAccess namespace.
00051 // *****************************************************************************
00052 BEGIN_OA_NAMESPACE
00053 
00054 
00055 
00056 // *****************************************************************************
00057 // Forward declarations.
00058 // *****************************************************************************
00059 template <class T, typename D> class oaStdObserver;
00060 template <class T, oaUInt4 V> class oaVersionedObserver;
00061 template <class T> class oaTraits;
00062 class oaAppDef;
00063 class oaWafer;
00064 class oaDesign;
00065 class oaDMData;
00066 class oaLib;
00067 class oaLibDefList;
00068 class oaTech;
00069 class oaConstraintDef;
00070 class oaConstraintGroupDef;
00071 class oaConstraintParamDef;
00072 class oaDerivedLayerDef;
00073 class oaDerivedLayerParamDef;
00074 class oaGroupDef;
00075 class oaViewType;
00076 class oaChangeMgr;
00077 class oaParasiticNetwork;
00078 
00079 
00080 
00081 // *****************************************************************************
00082 // oaRevisionTraits<T>
00083 // *****************************************************************************
00084 #define oacObserverVersion2                     1
00085 #define oacObserverVersion1                     0
00086 
00087 template <class T>
00088 class oaRevisionTraits {
00089 public:
00090     typedef oaStdObserver<T, typename oaTraits<T>::modTypeType>  observer;
00091     enum {
00092         observerRevision = oacObserverVersion1
00093     };
00094     enum {
00095         scopedObserverRevision = oacObserverVersion2
00096     };
00097     enum {minObserverVersion1APIMinorRev = 22};
00098     enum {minObserverVersion2APIMinorRev = 44};
00099     enum {minObserverVersion2BranchAPIRev = 0};
00100     enum {minObserverVersion2SelfAPIRev = 0};
00101 };
00102 
00103 
00104 
00105 // *****************************************************************************
00106 // oaRevisionTraits<T> Specializations 
00107 // *****************************************************************************
00108 #define oacTechObserverVersion3                 2
00109 #define oacTechObserverVersion2                 1
00110 #define oacTechObserverVersion1                 0
00111 
00112 
00113 
00114 template <>
00115 class oaRevisionTraits<oaTech> {
00116 public:
00117     enum {
00118         observerRevision = oacTechObserverVersion3
00119     };
00120     enum {
00121         scopedObserverRevision = oacTechObserverVersion3
00122     };
00123     enum {minObserverVersion1APIMinorRev = 22};
00124     enum {minObserverVersion2APIMinorRev = 30};
00125 
00126     typedef oaVersionedObserver<oaTech, observerRevision>  observer;
00127 };
00128 
00129 template <>
00130 class oaRevisionTraits<oaAppDef> {
00131 public:
00132     enum {
00133         observerRevision = oacObserverVersion1
00134     };
00135     enum {
00136         scopedObserverRevision = oacObserverVersion1
00137     };
00138     enum {minObserverVersion1APIMinorRev = 22};
00139 
00140     typedef oaVersionedObserver<oaAppDef, observerRevision>  observer;
00141 };
00142 
00143 template <>
00144 class oaRevisionTraits<oaWafer> {
00145 public:
00146     enum {
00147         observerRevision = oacObserverVersion1
00148     };
00149     enum {
00150         scopedObserverRevision = oacObserverVersion1
00151     };
00152     enum {minObserverVersion1APIMinorRev = 22};
00153 
00154     typedef oaVersionedObserver<oaWafer, observerRevision>  observer;
00155 };
00156 
00157 template <>
00158 class oaRevisionTraits<oaDMData> {
00159 public:
00160     enum {
00161         observerRevision = oacObserverVersion1
00162     };
00163     enum {
00164         scopedObserverRevision = oacObserverVersion1
00165     };
00166     enum {minObserverVersion1APIMinorRev = 22};
00167 
00168     typedef oaVersionedObserver<oaDMData, observerRevision>  observer;
00169 };
00170 
00171 template <>
00172 class oaRevisionTraits<oaLib> {
00173 public:
00174     enum {
00175         observerRevision = oacObserverVersion1
00176     };
00177     enum {
00178         scopedObserverRevision = oacObserverVersion1
00179     };
00180     enum {minObserverVersion1APIMinorRev = 22};
00181 
00182     typedef oaVersionedObserver<oaLib, observerRevision>  observer;
00183 };
00184 
00185 template <>
00186 class oaRevisionTraits<oaLibDefList> {
00187 public:
00188     enum {
00189         observerRevision = oacObserverVersion2
00190     };
00191     enum {
00192         scopedObserverRevision = oacObserverVersion2
00193     };
00194     enum {minObserverVersion1APIMinorRev = 22};
00195     enum {minObserverVersion2APIMinorRev = 44};
00196     enum {minObserverVersion2BranchAPIRev = 0};
00197     enum {minObserverVersion2SelfAPIRev = 0};
00198 
00199     typedef oaVersionedObserver<oaLibDefList, observerRevision>  observer;
00200 };
00201 
00202 template <>
00203 class oaRevisionTraits<oaDesign> {
00204 public:
00205     enum {
00206         observerRevision = oacObserverVersion1
00207     };
00208     enum {
00209         scopedObserverRevision = oacObserverVersion1
00210     };
00211     enum {minObserverVersion1APIMinorRev = 22};
00212     enum {minObserverVersion2APIMinorRev = 40};
00213     enum {minObserverVersion2BranchAPIRev = 0};
00214     enum {minObserverVersion2SelfAPIRev = 0};
00215 
00216     typedef oaVersionedObserver<oaDesign, observerRevision>  observer;
00217 };
00218 
00219 template <>
00220 class oaRevisionTraits<oaConstraintDef> {
00221 public:
00222     enum {
00223         observerRevision = oacObserverVersion1
00224     };
00225     enum {
00226         scopedObserverRevision = oacObserverVersion2
00227     };
00228     enum {minObserverVersion1APIMinorRev = 22};
00229     enum {minObserverVersion2APIMinorRev = 200};
00230     enum {minObserverVersion2BranchAPIRev = 0};
00231     enum {minObserverVersion2SelfAPIRev = 0};
00232 
00233     typedef oaVersionedObserver<oaConstraintDef, observerRevision>  observer;
00234 };
00235 
00236 template <>
00237 class oaRevisionTraits<oaConstraintGroupDef> {
00238 public:
00239     enum {
00240         observerRevision = oacObserverVersion1
00241     };
00242     enum {
00243         scopedObserverRevision = oacObserverVersion2
00244     };
00245     enum {minObserverVersion1APIMinorRev = 22};
00246     enum {minObserverVersion2APIMinorRev = 200};
00247     enum {minObserverVersion2BranchAPIRev = 0};
00248     enum {minObserverVersion2SelfAPIRev = 0};
00249 
00250     typedef oaVersionedObserver<oaConstraintGroupDef, observerRevision>  observer;
00251 };
00252 
00253 template <>
00254 class oaRevisionTraits<oaConstraintParamDef> {
00255 public:
00256     enum {
00257         observerRevision = oacObserverVersion1
00258     };
00259     enum {
00260         scopedObserverRevision = oacObserverVersion2
00261     };
00262     enum {minObserverVersion1APIMinorRev = 22};
00263     enum {minObserverVersion2APIMinorRev = 200};
00264     enum {minObserverVersion2BranchAPIRev = 0};
00265     enum {minObserverVersion2SelfAPIRev = 0};
00266 
00267     typedef oaVersionedObserver<oaConstraintParamDef, observerRevision>  observer;
00268 };
00269 
00270 template <>
00271 class oaRevisionTraits<oaDerivedLayerDef> {
00272 public:
00273     enum {
00274         observerRevision = oacObserverVersion1
00275     };
00276     enum {
00277         scopedObserverRevision = oacObserverVersion2
00278     };
00279     enum {minObserverVersion1APIMinorRev = 22};
00280     enum {minObserverVersion2APIMinorRev = 200};
00281     enum {minObserverVersion2BranchAPIRev = 0};
00282     enum {minObserverVersion2SelfAPIRev = 0};
00283 
00284     typedef oaVersionedObserver<oaDerivedLayerDef, observerRevision>  observer;
00285 };
00286 
00287 template <>
00288 class oaRevisionTraits<oaDerivedLayerParamDef> {
00289 public:
00290     enum {
00291         observerRevision = oacObserverVersion1
00292     };
00293     enum {
00294         scopedObserverRevision = oacObserverVersion2
00295     };
00296     enum {minObserverVersion1APIMinorRev = 22};
00297     enum {minObserverVersion2APIMinorRev = 200};
00298     enum {minObserverVersion2BranchAPIRev = 0};
00299     enum {minObserverVersion2SelfAPIRev = 0};
00300 
00301     typedef oaVersionedObserver<oaDerivedLayerParamDef, observerRevision>  observer;
00302 };
00303 
00304 template <>
00305 class oaRevisionTraits<oaGroupDef> {
00306 public:
00307     enum {
00308         observerRevision = oacObserverVersion1
00309     };
00310     enum {
00311         scopedObserverRevision = oacObserverVersion2
00312     };
00313     enum {minObserverVersion1APIMinorRev = 22};
00314     enum {minObserverVersion2APIMinorRev = 200};
00315     enum {minObserverVersion2BranchAPIRev = 0};
00316     enum {minObserverVersion2SelfAPIRev = 0};
00317 
00318     typedef oaVersionedObserver<oaGroupDef, observerRevision>  observer;
00319 };
00320 
00321 template <>
00322 class oaRevisionTraits<oaViewType> {
00323 public:
00324     enum {
00325         observerRevision = oacObserverVersion1
00326     };
00327     enum {
00328         scopedObserverRevision = oacObserverVersion2
00329     };
00330     enum {minObserverVersion1APIMinorRev = 22};
00331     enum {minObserverVersion2APIMinorRev = 200};
00332     enum {minObserverVersion2BranchAPIRev = 0};
00333     enum {minObserverVersion2SelfAPIRev = 0};
00334 
00335     typedef oaVersionedObserver<oaViewType, observerRevision>  observer;
00336 };
00337 
00338 template <>
00339 class oaRevisionTraits<oaChangeMgr> {
00340 public:
00341     enum {
00342         observerRevision = oacObserverVersion1
00343     };
00344     enum {
00345         scopedObserverRevision = oacObserverVersion2
00346     };
00347     enum {minObserverVersion1APIMinorRev = 22};
00348     enum {minObserverVersion2APIMinorRev = 200};
00349     enum {minObserverVersion2BranchAPIRev = 0};
00350     enum {minObserverVersion2SelfAPIRev = 0};
00351 
00352     typedef oaVersionedObserver<oaChangeMgr, scopedObserverRevision>  observer;
00353 };
00354 
00355 template <>
00356 class oaRevisionTraits<oaParasiticNetwork> {
00357 public:
00358     enum {
00359         observerRevision = oacObserverVersion1
00360     };
00361     enum {
00362         scopedObserverRevision = oacObserverVersion2
00363     };
00364     enum {minObserverVersion1APIMinorRev = 22};
00365     enum {minObserverVersion2APIMinorRev = 200};
00366     enum {minObserverVersion2BranchAPIRev = 0};
00367     enum {minObserverVersion2SelfAPIRev = 0};
00368 
00369     typedef oaVersionedObserver<oaParasiticNetwork, observerRevision>  observer;
00370 };
00371 
00372 END_OA_NAMESPACE
00373 
00374 #endif

Return to top of page