CFx SDK Documentation  2022 SP0
XRefMan.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 
26 
27 #ifndef _XREFMAN_H_
28 #define _XREFMAN_H_
29 
30 #include "RxObject.h"
31 #include "SmartPtr.h"
32 #include "DbLayerTableRecord.h"
33 #include "DbBlockTableRecord.h"
34 #include "DbLinetypeTableRecord.h"
35 #include "DbTextStyleTableRecord.h"
36 #include "DbSecurity.h"
37 
38 #include "TD_PackPush.h"
39 
45 {
46 public:
55  static OdResult load(OdDbDatabase* pHostDb, const OdString& xrefBlockname);
56 
65  static OdResult load(OdDbObjectIdArray& xrefBTRids);
66 
76 
87  static OdResult loadAll(OdDbDatabase* pHostDb, bool verify = false);
88 
93  static void unload(OdDbBlockTableRecord* pBTR);
94 
99  static void unload(OdDbObjectIdArray& xrefBTRids);
100 
105  static void unloadAll(OdDbDatabase* pHostDb);
106 
112  static OdResult bind(OdDbBlockTableRecord* pBTR, bool insertBind = false);
113 
119 
125  static void setOverlaid(OdDbBlockTableRecord* pBTR, bool overlaid = true);
126 
127 };
128 
138 {
139 public:
154  addNewXRefDefBlock(OdDbDatabase* pDb, const OdString& pathName,
155  const OdString& blockName, bool overlaid,
156  const OdPassword& password = OdPassword(),
157  OdDbHandle handle = 0);
158 
169  addNewXRefDependentLayer(const OdDbBlockTableRecord* pXRefBlock, const OdString& layerName);
170 
181  { return addNewXRefDependentLayer(OdDbBlockTableRecordPtr(xRefBlockId.safeOpenObject()), layerName); }
182 
193  addNewXRefDependentLinetype(const OdDbBlockTableRecord* pXRefBlock, const OdString& linetypeName);
194 
205  addNewXRefDependentLinetype(OdDbObjectId xRefBlockId, const OdString& linetypeName)
206  { return addNewXRefDependentLinetype(OdDbBlockTableRecordPtr(xRefBlockId.safeOpenObject()), linetypeName); }
207 
218  addNewXRefDependentTextStyle(const OdDbBlockTableRecord* pXRefBlock, const OdString& textStyleName);
219 
230  addNewXRefDependentTextStyle(OdDbObjectId xRefBlockId, const OdString& textStyleName)
231  { return addNewXRefDependentTextStyle(OdDbBlockTableRecordPtr(xRefBlockId.safeOpenObject()), textStyleName); }
232 
236  static void addNestedXRefId(OdDbBlockTableRecord* pXRefBlock, OdDbObjectId nestedBlockId);
237 
242 
247 };
248 
249 #include "TD_PackPop.h"
250 
251 #endif //_XREFMAN_H_
252 
253 
OdSmartPtr< OdDbBlockTableRecord > OdDbBlockTableRecordPtr
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdString OdPassword
Definition: DbSecurity.h:52
OdResult
Definition: OdResult.h:29
OdDbObjectPtr safeOpenObject(OdDb::OpenMode openMode=OdDb::kForRead, bool openErasedOne=false) const
static OdDbBlockTableRecordPtr addNewXRefDefBlock(OdDbDatabase *pDb, const OdString &pathName, const OdString &blockName, bool overlaid, const OdPassword &password=OdPassword(), OdDbHandle handle=0)
static OdDbTextStyleTableRecordPtr addNewXRefDependentTextStyle(OdDbObjectId xRefBlockId, const OdString &textStyleName)
Definition: XRefMan.h:230
static OdDbLinetypeTableRecordPtr addNewXRefDependentLinetype(const OdDbBlockTableRecord *pXRefBlock, const OdString &linetypeName)
static OdDbObjectId getSymbolTableRecordXrefBlockId(const OdDbSymbolTableRecord *pRec)
static OdDbLinetypeTableRecordPtr addNewXRefDependentLinetype(OdDbObjectId xRefBlockId, const OdString &linetypeName)
Definition: XRefMan.h:205
static OdDbLayerTableRecordPtr addNewXRefDependentLayer(const OdDbBlockTableRecord *pXRefBlock, const OdString &layerName)
static void getNestedXRefIds(OdDbBlockTableRecord *pXRefBlock, OdDbObjectIdArray &ids)
static OdDbTextStyleTableRecordPtr addNewXRefDependentTextStyle(const OdDbBlockTableRecord *pXRefBlock, const OdString &textStyleName)
static void addNestedXRefId(OdDbBlockTableRecord *pXRefBlock, OdDbObjectId nestedBlockId)
static OdDbLayerTableRecordPtr addNewXRefDependentLayer(OdDbObjectId xRefBlockId, const OdString &layerName)
Definition: XRefMan.h:180
static void unload(OdDbBlockTableRecord *pBTR)
static void setOverlaid(OdDbBlockTableRecord *pBTR, bool overlaid=true)
static OdResult load(OdDbDatabase *pHostDb, const OdString &xrefBlockname)
static OdResult loadAll(OdDbDatabase *pHostDb, bool verify=false)
static OdResult load(OdDbObjectIdArray &xrefBTRids)
static void unload(OdDbObjectIdArray &xrefBTRids)
static OdResult bind(OdDbBlockTableRecord *pBTR, bool insertBind=false)
static void unloadAll(OdDbDatabase *pHostDb)
static OdResult detach(OdDbBlockTableRecord *pBTR)
static OdResult load(OdDbBlockTableRecord *pBTR)