oaCMObserver.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaCMObserver.h
00004 //
00005 // This file contains the definition for those oaCM 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-2008 Cadence Design Systems, Inc.
00015 //                           All Rights Reserved.
00016 //
00017 //  $Author: davidy $
00018 //  $Revision: #1 $
00019 //  $Date: 2007/06/11 $
00020 //  $State: Exp $
00021 // *****************************************************************************
00022 // *****************************************************************************
00023 
00024 
00025 
00026 #if !defined(oaCMObserver_P)
00027 #define oaCMObserver_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaCMBaseTypes.h"
00035 #include "oaCMModTypes.h"
00036 #include "oaObserver.h"
00037 
00038 
00039 
00040 // *****************************************************************************
00041 // Declare and define types in the OpenAccess namespace.
00042 // *****************************************************************************
00043 BEGIN_OA_NAMESPACE
00044 
00045 
00046 
00047 // *****************************************************************************
00048 // Forward Class Declarations
00049 // *****************************************************************************
00050 class oaChangeMgr;
00051 class oaChangeSetBase;
00052 
00053 
00054 
00055 // *****************************************************************************
00056 // oaVersionedObserver<oaChangeMgr> specialization
00057 // *****************************************************************************
00058 // <TM> Added to make these observers show up. The actual header file is at
00059 // \oa\src\cm\oaCMObserver.h
00060 template<>
00061 class OA_CM_DLL_API oaVersionedObserver<oaChangeMgr> : public oaBaseObserver {//Removed ", oaRevisionTraits<oaChangeMgr>::scopedObserverRevision"
00062 public:
00063                                                                     oaVersionedObserver(oaUInt4     priorityIn,
00064                                                                                         oaBoolean   enabledIn = true);
00065     virtual                                                         ~oaVersionedObserver();
00066 
00067     virtual void                                                    onInvalidate(oaChangeMgrModTypeEnum modType);
00068     virtual void                                                    onPreImport();
00069     virtual void                                                    onPostImport();
00070     virtual void                                                    onPreExport();
00071     virtual void                                                    onPostExport();
00072 /* <JR> Dell does not want these doc'd.
00073     static oaBoolean                                                hasObservers();
00074     static void                                                     notifyInvalidateObservers(oaChangeMgrModTypeEnum modType);
00075     static void                                                     notifyPreImportObservers();
00076     static void                                                     notifyPostImportObservers();
00077     static void                                                     notifyPreExportObservers();
00078     static void                                                     notifyPostExportObservers();
00079 */
00080 private:
00081     typedef oaVersionedObserver<oaChangeMgr, oaRevisionTraits<oaChangeMgr>::scopedObserverRevision>   oaChangeMgrObserver;
00082 
00083     oaChangeMgrObserver                                             *next;
00084 
00085     static oaChangeMgrObserver                                      *first;
00086 };
00087 
00088 
00089 
00090 // *****************************************************************************
00091 // oaChangeSetObserver
00092 // *****************************************************************************
00093 class OA_CM_DLL_API oaChangeSetObserver {
00094 public:
00095                             oaChangeSetObserver(oaUInt4     priorityIn,
00096                                                 oaBoolean   enabledIn = true);
00097     virtual                 ~oaChangeSetObserver();
00098 
00099     virtual void            onPostCreate(oaChangeSetBase *cs);
00100     virtual void            onPreDestroy(oaChangeSetBase *cs);
00101     virtual void            onEmpty(oaChangeSetBase *cs);
00102     virtual void            onFirstChange(oaChangeSetBase *cs);
00103     virtual void            onFullExport(oaChangeSetBase    *cs);
00104     virtual void            onIncrementalExport(oaChangeSetBase *cs);
00105 
00106     oaBoolean               isEnabled();
00107     void                    enable(oaBoolean enabled);
00108     oaUInt4                 getPriority() const;
00109 
00110 /* This does not need to be doc'd.
00111 private:
00112     void                    *m_pImpl;
00113 */
00114 };
00115 
00116 
00117 
00118 END_OA_NAMESPACE
00119 
00120 #endif

Return to top of page