CFx SDK Documentation  2022 SP0
ApLongTransactions.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 
25 #ifndef _LONG_TRANSACTION_MANAGER_H_INCLUDED_
26 #define _LONG_TRANSACTION_MANAGER_H_INCLUDED_
27 
28 #include "RxObject.h"
29 #include "IdArrays.h"
30 #include "TD_PackPush.h"
31 
33 class OdDbDatabase;
34 class OdDbIdMapping;
35 
45 {
46 public:
49 
55  virtual void beginCheckOut (OdDbLongTransaction& , OdDbObjectIdArray& originList);
59  virtual void endCheckOut (OdDbLongTransaction& );
67  virtual void endCheckIn (OdDbLongTransaction& );
72 
76 protected:
78 
79 private:
80  bool m_Veto;
81  friend class OdApLongTransactionManagerImpl;
82 };
83 
96 {
97 public:
99 
110  virtual OdResult checkOut(OdDbObjectId& transId, OdDbObjectIdArray& objList,
111  OdDbObjectId toBlock, OdDbIdMapping& errorMap, OdDbObjectId lockBlkRef = OdDbObjectId::kNull) = 0;
112 
120  virtual OdResult checkIn(OdDbObjectId transId, OdDbIdMapping& errorMap, bool keepObjs = false) = 0;
121 
128  virtual OdResult abortLongTransaction(OdDbObjectId transId, bool keepObjs = false) = 0;
129 
130  virtual OdDbObjectId currentLongTransactionFor(const OdDbDatabase* pDb) const = 0;
139 
147  virtual bool isFiltered (OdRxClass* ) const = 0;
148 };
149 
151 
152 #include "TD_PackPop.h"
153 #endif // _LONG_TRANSACTION_MANAGER_H_INCLUDED_
TOOLKIT_EXPORT OdApLongTransactionManager * odapLongTransactionManager()
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
#define ODRX_ABSTRACT
OdResult
Definition: OdResult.h:29
virtual OdResult abortLongTransaction(OdDbObjectId transId, bool keepObjs=false)=0
virtual OdResult addClassFilter(OdRxClass *)=0
virtual OdResult checkOut(OdDbObjectId &transId, OdDbObjectIdArray &objList, OdDbObjectId toBlock, OdDbIdMapping &errorMap, OdDbObjectId lockBlkRef=OdDbObjectId::kNull)=0
virtual void addReactor(OdApLongTransactionReactor *)=0
virtual void removeReactor(OdApLongTransactionReactor *)=0
virtual OdResult checkIn(OdDbObjectId transId, OdDbIdMapping &errorMap, bool keepObjs=false)=0
ODRX_DECLARE_MEMBERS(OdApLongTransactionManager)
virtual OdDbObjectId currentLongTransactionFor(const OdDbDatabase *pDb) const =0
virtual bool isFiltered(OdRxClass *) const =0
virtual void beginCheckIn(OdDbLongTransaction &)
virtual void endCheckIn(OdDbLongTransaction &)
virtual void abortLongTransaction(OdDbLongTransaction &)
ODRX_DECLARE_MEMBERS(OdApLongTransactionReactor)
virtual void endCheckOut(OdDbLongTransaction &)
virtual void beginCheckOut(OdDbLongTransaction &, OdDbObjectIdArray &originList)
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
Definition: DbObjectId.h:118