CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
XRefMan.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2024 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"
36#include "DbSecurity.h"
37
38#include "TD_PackPush.h"
39
45{
46public:
56 static OdResult load(OdDbDatabase* pHostDb, const OdString& xrefBlockname);
57
67 static OdResult load(OdDbObjectIdArray& xrefBTRids);
68
79
91 static OdResult loadAll(OdDbDatabase* pHostDb, bool verify = false);
92
99 static void unload(OdDbBlockTableRecord* pBTR);
100
107 static void unload(OdDbObjectIdArray& xrefBTRids);
108
115 static void unloadAll(OdDbDatabase* pHostDb);
116
125 static OdResult bind(OdDbBlockTableRecord* pBTR, bool insertBind = false);
126
135
143 static void setOverlaid(OdDbBlockTableRecord* pBTR, bool overlaid = true);
144
145};
146
156{
157public:
174 const OdString& blockName, bool overlaid,
175 const OdPassword& password = OdPassword(),
176 OdDbHandle handle = 0);
177
189 addNewXRefDependentLayer(const OdDbBlockTableRecord* pXRefBlock, const OdString& layerName);
190
202 { return addNewXRefDependentLayer(OdDbBlockTableRecordPtr(xRefBlockId.safeOpenObject()), layerName); }
203
215 addNewXRefDependentLinetype(const OdDbBlockTableRecord* pXRefBlock, const OdString& linetypeName);
216
228 addNewXRefDependentLinetype(OdDbObjectId xRefBlockId, const OdString& linetypeName)
229 { return addNewXRefDependentLinetype(OdDbBlockTableRecordPtr(xRefBlockId.safeOpenObject()), linetypeName); }
230
242 addNewXRefDependentTextStyle(const OdDbBlockTableRecord* pXRefBlock, const OdString& textStyleName);
243
255 addNewXRefDependentTextStyle(OdDbObjectId xRefBlockId, const OdString& textStyleName)
256 { return addNewXRefDependentTextStyle(OdDbBlockTableRecordPtr(xRefBlockId.safeOpenObject()), textStyleName); }
257
263 static void addNestedXRefId(OdDbBlockTableRecord* pXRefBlock, OdDbObjectId nestedBlockId);
264
271
279
289 static OdResult bindRecords(const OdDbObjectIdArray& ids, OdDbDatabase* pHostDatabase);
290};
291
292#include "TD_PackPop.h"
293
294#endif //_XREFMAN_H_
OdSmartPtr< OdDbBlockTableRecord > OdDbBlockTableRecordPtr
OdSmartPtr< OdDbTextStyleTableRecord > OdDbTextStyleTableRecordPtr
Definition DbDatabase.h:165
OdSmartPtr< OdDbLinetypeTableRecord > OdDbLinetypeTableRecordPtr
Definition DbDatabase.h:177
#define TOOLKIT_EXPORT
Definition DbExport.h:40
OdSmartPtr< OdDbLayerTableRecord > OdDbLayerTableRecordPtr
OdString OdPassword
Definition DbSecurity.h:52
OdArray< OdDbObjectId, OdClrMemAllocator< OdDbObjectId > > OdDbObjectIdArray
Definition IdArrays.h:53
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:255
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:228
static OdDbLayerTableRecordPtr addNewXRefDependentLayer(const OdDbBlockTableRecord *pXRefBlock, const OdString &layerName)
static void getNestedXRefIds(OdDbBlockTableRecord *pXRefBlock, OdDbObjectIdArray &ids)
static OdResult bindRecords(const OdDbObjectIdArray &ids, OdDbDatabase *pHostDatabase)
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:201
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)