00001 // ***************************************************************************** 00002 // ***************************************************************************** 00003 // oaChangeMgr.h 00004 // 00005 // This file contains the definitions for the oaChangeMgr class. 00006 // 00007 // oaChangeMgr 00008 // Applications access CMS functionality through OpenAccess public API’s 00009 // on the oaChangeMgr class. There are interfaces that provide the ability 00010 // to initialize change management tracking plug-ins, initialize export 00011 // plug-ins, start and stop change-management tracking, and export the 00012 // tracked changes. 00013 // 00014 // The oaChangeMgr class delegates all operations to the tracking and 00015 // export plug-ins. The tracking plug-in provides the mechanisms to create 00016 // and manage change sets. Change sets must be named by the application. 00017 // 00018 // The current change set refers to the last change set that was created 00019 // by the application. Change records will be created and placed in the 00020 // current change set if it has not been ended or closed. 00021 // 00022 // ***************************************************************************** 00023 // Except as specified in the OpenAccess terms of use of Cadence or Silicon 00024 // Integration Initiative, this material may not be copied, modified, 00025 // re-published, uploaded, executed, or distributed in any way, in any medium, 00026 // in whole or in part, without prior written permission from Cadence. 00027 // 00028 // Copyright 2007 Cadence Design Systems, Inc. 00029 // All Rights Reserved. 00030 // 00031 // $Author: icftcm $ 00032 // $Revision: #2 $ 00033 // $Date: 2010/10/18 $ 00034 // $State: Exp $ 00035 // ***************************************************************************** 00036 // ***************************************************************************** 00037 00038 00039 00040 #if !defined(oaChangeMgr_P) 00041 #define oaChangeMgr_P 00042 00043 00044 00045 // **************************************************************************** 00046 // Nested includes 00047 // **************************************************************************** 00048 #include <map> 00049 #include <string> 00050 #include "oaCMBaseTypes.h" 00051 00052 00053 00054 // ***************************************************************************** 00055 // Declare names in the OA namespace. 00056 // ***************************************************************************** 00057 BEGIN_OA_NAMESPACE 00058 00059 00060 00061 // ***************************************************************************** 00062 // Forward Public Class Declarations 00063 // ***************************************************************************** 00064 class oaCMProtocolArray; 00065 class oaCMProtocol; 00066 class oaChangeSetBase; 00067 class oaString; 00068 struct oaChangeMgrImpl; 00069 00070 00071 // ***************************************************************************** 00072 // oaChangeMgr 00073 // ***************************************************************************** 00074 class OA_CM_DLL_API oaChangeMgr { 00075 public: 00076 typedef std::map<std::string, oaChangeSetBase*>::const_iterator ChangeSetConstIter; 00077 00078 static oaChangeMgr *get(); 00079 00080 void initTracking(const oaString &pluginName); 00081 void initExport(const oaString &pluginName); 00082 00083 void getTrackingProtocols(oaCMProtocolArray &out) const; 00084 void getExportProtocols(oaCMProtocolArray &out) const; 00085 00086 void setTrackingProtocol(const oaCMProtocol &in); 00087 void setExportProtocol(const oaCMProtocol &in); 00088 00089 void beginTracking(const oaString &nameIn); 00090 void endTracking(); 00091 00092 void exportFull(const oaString &changeSetName); 00093 void exportIncr(const oaString &changeSetName); 00094 00095 oaChangeSetBase *findChangeSet(const oaString &nameIn) const; 00096 void discardAllChangeSets(); 00097 00098 ChangeSetConstIter beginChangeSet() const; 00099 ChangeSetConstIter endChangeSet() const; 00100 00101 void discardChangeSet(const oaString &changeSetName); 00102 00103 private: 00104 oaChangeMgr(); 00105 ~oaChangeMgr(); 00106 00107 void add(const oaString &changeSetName, 00108 oaChangeSetBase *changeSet); 00109 void remove(oaChangeSetBase *changeSet); 00110 00111 mutable oaChangeMgrImpl *m_data; 00112 00113 friend class oaChangeSetBase; 00114 }; 00115 00116 00117 00118 END_OA_NAMESPACE 00119 00120 #endif
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.