oaBaseObserver.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaBaseObserver.h
00004 //
00005 // This file contains the definition for those oaBase classes that require
00006 // specialization of the generic oaVersionedObserver template.
00007 //
00008 // *****************************************************************************
00009 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00010 // Integration Initiative, this material may not be copied, modified,
00011 // re-published, uploaded, executed, or distributed in any way, in any medium,
00012 // in whole or in part, without prior written permission from Cadence.
00013 //
00014 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00015 //                           All Rights Reserved.
00016 //
00017 //  $Author: rajeshh $
00018 //  $Revision: #7 $
00019 //  $Date: 2008/06/27 $
00020 //  $State: Exp $
00021 // *****************************************************************************
00022 // *****************************************************************************
00023 
00024 
00025 
00026 #if !defined(oaBaseObserver_P)
00027 #define oaBaseObserver_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaAppDef.h"
00035 #include "oaConstraintParamDef.h"
00036 #include "oaConstraintDef.h"
00037 #include "oaAppObjectDef.h"
00038 #include "oaConstraint.h"
00039 #include "oaConstraintGroup.h"
00040 #include "oaGroup.h"
00041 #include "oaProp.h"
00042 #include "oaObserver.h"
00043 
00044 
00045 
00046 // *****************************************************************************
00047 // Declare and define types in the OpenAccess namespace.
00048 // *****************************************************************************
00049 BEGIN_OA_NAMESPACE
00050 
00051 
00052 
00053 // *****************************************************************************
00054 // Forward Class Declarations
00055 // *****************************************************************************
00056 class oaConstraintParamDef;
00057 class oaConstraintParam;
00058 class oaConstraintDef;
00059 class oaGroupDef;
00060 class oaConstraintGroupDef;
00061 class oaAppObject;
00062 class oaConstraint;
00063 class oaGroup;
00064 class oaGroupMember;
00065 class oaProp;
00066 class oaChangeMgr; // <TM> Added.
00067 
00068 
00069 
00070 // *****************************************************************************
00071 // Explicit template instantiations
00072 // *****************************************************************************
00073 #if defined(OA_BASE_DLL_EXTERN)
00074 OA_BASE_DLL_EXTERN template
00075  class OA_BASE_DLL_API oaVersionedObserver<oaAppObject, oaRevisionTraits<oaAppObject>::scopedObserverRevision>;
00076 
00077 OA_BASE_DLL_EXTERN template
00078  class OA_BASE_DLL_API oaVersionedObserver<oaConstraint, oaRevisionTraits<oaConstraint>::scopedObserverRevision>;
00079 
00080 OA_BASE_DLL_EXTERN template
00081  class OA_BASE_DLL_API oaVersionedObserver<oaConstraintGroup, oaRevisionTraits<oaConstraintGroup>::scopedObserverRevision>;
00082 
00083 OA_BASE_DLL_EXTERN template
00084  class OA_BASE_DLL_API oaVersionedObserver<oaConstraintGroupMem, oaRevisionTraits<oaConstraintGroupMem>::scopedObserverRevision>;
00085 
00086 OA_BASE_DLL_EXTERN template
00087  class OA_BASE_DLL_API oaVersionedObserver<oaConstraintParam, oaRevisionTraits<oaConstraintParam>::scopedObserverRevision>;
00088 
00089 OA_BASE_DLL_EXTERN template
00090  class OA_BASE_DLL_API oaVersionedObserver<oaGroup, oaRevisionTraits<oaGroup>::scopedObserverRevision>;
00091 
00092 OA_BASE_DLL_EXTERN template
00093  class OA_BASE_DLL_API oaVersionedObserver<oaGroupMember, oaRevisionTraits<oaGroupMember>::scopedObserverRevision>;
00094 
00095 OA_BASE_DLL_EXTERN template
00096  class OA_BASE_DLL_API oaVersionedObserver<oaProp, oaRevisionTraits<oaProp>::scopedObserverRevision>;
00097 
00098 OA_BASE_DLL_EXTERN template
00099  class OA_BASE_DLL_API oaVersionedObserver<oaValue, oaRevisionTraits<oaValue>::scopedObserverRevision>;
00100 
00101 #endif
00102 
00103 
00104 
00105 // *****************************************************************************
00106 // oaVersionedObserver<oaAppDef> specialization
00107 // *****************************************************************************
00108 template<>
00109 class OA_BASE_DLL_API oaVersionedObserver<oaAppDef, oacObserverVersion1> : public oaBaseObserver {
00110 public:
00111                                                                 oaVersionedObserver(oaUInt4     priorityIn,
00112                                                                                     oaBoolean   enabledIn = true);
00113     virtual                                                     ~oaVersionedObserver();
00114 
00115     virtual void                                                onPreModify(oaObject    *object,
00116                                                                             oaAppDef    *appDef);
00117     virtual void                                                onPostModify(oaObject   *object,
00118                                                                              oaAppDef   *appDef);
00119 
00120     virtual void                                                onConflict(const oaString   &name,
00121                                                                            oaType           type);
00122 
00123     static oaBoolean                                            hasObservers();
00124     static void                                                 notifyPreModifyObservers(oaObject   *object,
00125                                                                                          oaAppDef   *appDef);
00126     static void                                                 notifyPostModifyObservers(oaObject  *object,
00127                                                                                           oaAppDef  *appDef);
00128 
00129 
00130     static void                                                 notifyOnConflictObservers(const oaString    &name,
00131                                                                                           oaType            type);
00132 
00133 private:
00134     typedef oaVersionedObserver<oaAppDef, oacObserverVersion1>  oaAppDefObserver;
00135 
00136     oaAppDefObserver                                            *next;
00137 
00138     static oaAppDefObserver                                     *first;
00139 };
00140 
00141 
00142 
00143 // *****************************************************************************
00144 // oaVersionedObserver<oaConstraintParamDef> specialization
00145 // *****************************************************************************
00146 template<>
00147 class OA_BASE_DLL_API oaVersionedObserver<oaConstraintParamDef, oacObserverVersion1> : public oaBaseObserver {
00148 public:
00149                                                                             oaVersionedObserver(oaUInt4     priorityIn,
00150                                                                                                 oaBoolean   enabledIn = true);
00151     virtual                                                                 ~oaVersionedObserver();
00152 
00153     virtual void                                                            onPreDestroy(oaConstraintParamDef *def);
00154     virtual void                                                            onPostCreate(oaConstraintParamDef *def);
00155     virtual void                                                            onConflict(const oaString   &name,
00156                                                                                        oaType           valueType);
00157 
00158     static oaBoolean                                                        hasObservers();
00159 
00160     static void                                                             notifyPreDestroyObservers(oaConstraintParamDef *def);
00161     static void                                                             notifyPostCreateObservers(oaConstraintParamDef *def);
00162     static void                                                             notifyOnConflictObservers(const oaString    &name,
00163                                                                                                       oaType            valueType);
00164 private:
00165     typedef oaVersionedObserver<oaConstraintParamDef, oacObserverVersion1>  oaConstraintParamDefObserver;
00166 
00167     oaConstraintParamDefObserver                                            *next;
00168 
00169     static oaConstraintParamDefObserver                                     *first;
00170 };
00171 /* <TM>  comment out.
00172 template<>
00173 class OA_BASE_DLL_API oaVersionedObserver<oaConstraintParamDef, oaRevisionTraits<oaConstraintParamDef>::scopedObserverRevision> : public oaVersionedObserver<oaConstraintParamDef, oacObserverVersion1> {
00174 public:
00175                                                                             oaVersionedObserver(oaUInt4     priorityIn,
00176                                                                                                 oaBoolean   enabledIn = true);
00177     virtual                                                                 ~oaVersionedObserver();
00178 
00179     virtual void                                                            onBeginCreate(oaObject  *owner,
00180                                                                                           oaUInt4   scopeID);
00181     virtual void                                                            onEndCreate(oaConstraintParamDef    *object,
00182                                                                                         oaUInt4                 scopeID);
00183     virtual void                                                            onBeginDestroy(oaConstraintParamDef *object,
00184                                                                                            oaUInt4              scopeID);
00185     virtual void                                                            onEndDestroy(oaObject   *owner,
00186                                                                                          oaUInt4    scopeID);
00187 
00188     static oaBoolean                                                        hasObservers();
00189 
00190     static void                                                             notifyBeginCreateObservers(oaObject *database,
00191                                                                                                        oaUInt4  scopeID);
00192     static void                                                             notifyEndCreateObservers(oaConstraintParamDef   *object,
00193                                                                                                      oaUInt4                scopeID);
00194     static void                                                             notifyBeginDestroyObservers(oaConstraintParamDef    *object,
00195                                                                                                         oaUInt4                 scopeID);
00196     static void                                                             notifyEndDestroyObservers(oaObject  *database,
00197                                                                                                       oaUInt4   scopeID);
00198 
00199 private:
00200     typedef oaVersionedObserver<oaConstraintParamDef, oaRevisionTraits<oaConstraintParamDef>::scopedObserverRevision>  oaConstraintParamDefObserver;
00201 
00202     oaConstraintParamDefObserver                                            *next;
00203 
00204     static oaConstraintParamDefObserver                                     *first;
00205 };
00206 */ <TM> Close comment.
00207 
00208 
00209 // *****************************************************************************
00210 // oaVersionedObserver<oaConstraintDef> specialization
00211 // *****************************************************************************
00212 template<>
00213 class OA_BASE_DLL_API oaVersionedObserver<oaConstraintDef, oacObserverVersion1> : public oaBaseObserver {
00214 public:
00215                                                                         oaVersionedObserver(oaUInt4     priorityIn,
00216                                                                                             oaBoolean   enabledIn = true);
00217     virtual                                                             ~oaVersionedObserver();
00218 
00219     virtual void                                                        onPreDestroy(oaConstraintDef *def);
00220     virtual void                                                        onPostCreate(oaConstraintDef *def);
00221     virtual void                                                        onConflict(const oaString   &name,
00222                                                                                    oaType           defType);
00223 
00224     static oaBoolean                                                    hasObservers();
00225     static void                                                         notifyPreDestroyObservers(oaConstraintDef *def);
00226     static void                                                         notifyPostCreateObservers(oaConstraintDef *def);
00227     static void                                                         notifyOnConflictObservers(const oaString    &name,
00228                                                                                                   oaType            defType);
00229 private:
00230     typedef oaVersionedObserver<oaConstraintDef, oacObserverVersion1>   oaConstraintDefObserver;
00231 
00232     oaConstraintDefObserver                                             *next;
00233 
00234     static oaConstraintDefObserver                                      *first;
00235 };
00236 /* <TM>  comment out.
00237 template<>
00238 class OA_BASE_DLL_API oaVersionedObserver<oaConstraintDef, oaRevisionTraits<oaConstraintDef>::scopedObserverRevision> : public oaVersionedObserver<oaConstraintDef, oacObserverVersion1> {
00239 public:
00240                                                                         oaVersionedObserver(oaUInt4     priorityIn,
00241                                                                                             oaBoolean   enabledIn = true);
00242     virtual                                                             ~oaVersionedObserver();
00243 
00244     virtual void                                                        onBeginCreate(oaObject  *owner,
00245                                                                                       oaUInt4   scopeID);
00246     virtual void                                                        onEndCreate(oaConstraintDef *object,
00247                                                                                     oaUInt4         scopeID);
00248     virtual void                                                        onBeginDestroy(oaConstraintDef  *object,
00249                                                                                        oaUInt4          scopeID);
00250     virtual void                                                        onEndDestroy(oaObject   *owner,
00251                                                                                      oaUInt4    scopeID);
00252 
00253     static oaBoolean                                                    hasObservers();
00254 
00255     static void                                                         notifyBeginCreateObservers(oaObject *database,
00256                                                                                                    oaUInt4  scopeID);
00257     static void                                                         notifyEndCreateObservers(oaConstraintDef    *object,
00258                                                                                                  oaUInt4            scopeID);
00259     static void                                                         notifyBeginDestroyObservers(oaConstraintDef *object,
00260                                                                                                     oaUInt4         scopeID);
00261     static void                                                         notifyEndDestroyObservers(oaObject  *database,
00262                                                                                                   oaUInt4   scopeID);
00263 private:
00264     typedef oaVersionedObserver<oaConstraintDef, oaRevisionTraits<oaConstraintDef>::scopedObserverRevision>   oaConstraintDefObserver;
00265 
00266     oaConstraintDefObserver                                             *next;
00267 
00268     static oaConstraintDefObserver                                      *first;
00269 };
00270 */ <TM> Close comment.
00271 
00272 
00273 // *****************************************************************************
00274 // oaVersionedObserver<oaGroupDef> specialization
00275 // *****************************************************************************
00276 template<>
00277 class OA_BASE_DLL_API oaVersionedObserver<oaGroupDef, oacObserverVersion1> : public oaBaseObserver {
00278 public:
00279                                                                     oaVersionedObserver(oaUInt4     priorityIn,
00280                                                                                         oaBoolean   enabledIn = true);
00281     virtual                                                         ~oaVersionedObserver();
00282 
00283     virtual void                                                    onPreDestroy(oaGroupDef *def);
00284     virtual void                                                    onPostCreate(oaGroupDef *def);
00285     virtual void                                                    onConflict(const oaString   &name,
00286                                                                                oaType           defType);
00287 
00288     static oaBoolean                                                hasObservers();
00289     static void                                                     notifyPreDestroyObservers(oaGroupDef *def);
00290     static void                                                     notifyPostCreateObservers(oaGroupDef *def);
00291     static void                                                     notifyOnConflictObservers(const oaString    &name,
00292                                                                                               oaType            defType);
00293 private:
00294     typedef oaVersionedObserver<oaGroupDef, oacObserverVersion1>    oaGroupDefObserver;
00295 
00296     oaGroupDefObserver                                              *next;
00297 
00298     static oaGroupDefObserver                                       *first;
00299 };
00300 /* <TM>  comment out.
00301 template<>
00302 class OA_BASE_DLL_API oaVersionedObserver<oaGroupDef, oaRevisionTraits<oaGroupDef>::scopedObserverRevision> : public oaVersionedObserver<oaGroupDef, oacObserverVersion1> {
00303 public:
00304                                                                     oaVersionedObserver(oaUInt4     priorityIn,
00305                                                                                         oaBoolean   enabledIn = true);
00306     virtual                                                         ~oaVersionedObserver();
00307 
00308     virtual void                                                    onBeginCreate(oaObject  *owner,
00309                                                                                   oaUInt4   scopeID);
00310     virtual void                                                    onEndCreate(oaGroupDef  *object,
00311                                                                                 oaUInt4     scopeID);
00312     virtual void                                                    onBeginDestroy(oaGroupDef   *object,
00313                                                                                    oaUInt4      scopeID);
00314     virtual void                                                    onEndDestroy(oaObject   *owner,
00315                                                                                  oaUInt4    scopeID);
00316 
00317     static oaBoolean                                                hasObservers();
00318 
00319     static void                                                     notifyBeginCreateObservers(oaObject *database,
00320                                                                                                oaUInt4  scopeID);
00321     static void                                                     notifyEndCreateObservers(oaGroupDef *object,
00322                                                                                              oaUInt4    scopeID);
00323     static void                                                     notifyBeginDestroyObservers(oaGroupDef  *object,
00324                                                                                                 oaUInt4     scopeID);
00325     static void                                                     notifyEndDestroyObservers(oaObject  *database,
00326                                                                                               oaUInt4   scopeID);
00327 
00328 private:
00329     typedef oaVersionedObserver<oaGroupDef, oaRevisionTraits<oaGroupDef>::scopedObserverRevision>    oaGroupDefObserver;
00330 
00331     oaGroupDefObserver                                              *next;
00332 
00333     static oaGroupDefObserver                                       *first;
00334 };
00335 */ <TM> Close comment
00336 
00337 
00338 // *****************************************************************************
00339 // oaVersionedObserver<oaConstraintGroupDef> specialization
00340 // *****************************************************************************
00341 template<>
00342 class OA_BASE_DLL_API oaVersionedObserver<oaConstraintGroupDef, oacObserverVersion1> : public oaBaseObserver {
00343 public:
00344                                                                             oaVersionedObserver(oaUInt4     priorityIn,
00345                                                                                                 oaBoolean   enabledIn = true);
00346     virtual                                                                 ~oaVersionedObserver();
00347 
00348     virtual void                                                            onPreDestroy(oaConstraintGroupDef *def);
00349     virtual void                                                            onPostCreate(oaConstraintGroupDef *def);
00350     virtual void                                                            onConflict(const oaString   &name,
00351                                                                                        oaType           defType);
00352 
00353     static oaBoolean                                                        hasObservers();
00354     static void                                                             notifyPreDestroyObservers(oaConstraintGroupDef *def);
00355     static void                                                             notifyPostCreateObservers(oaConstraintGroupDef *def);
00356     static void                                                             notifyOnConflictObservers(const oaString    &name,
00357                                                                                                       oaType            defType);
00358 
00359 private:
00360     typedef oaVersionedObserver<oaConstraintGroupDef, oacObserverVersion1>  oaConstraintGroupDefObserver;
00361 
00362     oaConstraintGroupDefObserver                                            *next;
00363 
00364     static oaConstraintGroupDefObserver                                     *first;
00365 };
00366 /* <TM>  comment out.
00367 template<>
00368 class OA_BASE_DLL_API oaVersionedObserver<oaConstraintGroupDef, oaRevisionTraits<oaConstraintGroupDef>::scopedObserverRevision> : public oaVersionedObserver<oaConstraintGroupDef, oacObserverVersion1> {
00369 public:
00370                                                                             oaVersionedObserver(oaUInt4     priorityIn,
00371                                                                                                 oaBoolean   enabledIn = true);
00372     virtual                                                                 ~oaVersionedObserver();
00373 
00374     virtual void                                                            onBeginCreate(oaObject  *owner,
00375                                                                                           oaUInt4   scopeID);
00376     virtual void                                                            onEndCreate(oaConstraintGroupDef    *object,
00377                                                                                         oaUInt4                 scopeID);
00378     virtual void                                                            onBeginDestroy(oaConstraintGroupDef *object,
00379                                                                                            oaUInt4              scopeID);
00380     virtual void                                                            onEndDestroy(oaObject   *owner,
00381                                                                                          oaUInt4    scopeID);
00382 
00383     static oaBoolean                                                        hasObservers();
00384 
00385     static void                                                             notifyBeginCreateObservers(oaObject *database,
00386                                                                                                        oaUInt4  scopeID);
00387     static void                                                             notifyEndCreateObservers(oaConstraintGroupDef   *object,
00388                                                                                                      oaUInt4                scopeID);
00389     static void                                                             notifyBeginDestroyObservers(oaConstraintGroupDef    *object,
00390                                                                                                         oaUInt4                 scopeID);
00391     static void                                                             notifyEndDestroyObservers(oaObject  *database,
00392                                                                                                       oaUInt4   scopeID);
00393 
00394 private:
00395     typedef oaVersionedObserver<oaConstraintGroupDef, oaRevisionTraits<oaConstraintGroupDef>::scopedObserverRevision>  oaConstraintGroupDefObserver;
00396 
00397     oaConstraintGroupDefObserver                                            *next;
00398 
00399     static oaConstraintGroupDefObserver                                     *first;
00400 };
00401 */ <TM> Close comment
00402 
00403 
00404 
00405 END_OA_NAMESPACE
00406 
00407 #endif

Return to top of page