CFx SDK Documentation  2020SP3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
OdDbDatabase Class Reference

#include <DbDatabase.h>

Inheritance diagram for OdDbDatabase:
OdDbObject OdGiDrawable OdRxObject CFxDatabase

Public Member Functions

OdResult subGetClassID (void *pClsid) const
 
 ODRX_DECLARE_MEMBERS (OdDbDatabase)
 
void addRef ()
 
void release ()
 
OdDbHostAppServicesappServices () const
 
void initialize (OdDb::MeasurementValue measurement=OdDb::kEnglish)
 
void initialize (OdDb::MeasurementValue measurement, bool bVisualStyles)
 
virtual ~OdDbDatabase ()
 
OdDbObjectId addOdDbObject (OdDbObject *pObject, OdDbObjectId ownerId=OdDbObjectId::kNull, OdDbHandle handle=0)
 
bool newRegApp (const OdString &regAppName)
 
OdDbObjectId getBlockTableId () const
 
OdDbObjectId getLayerTableId () const
 
OdDbObjectId getTextStyleTableId () const
 
OdDbObjectId getLinetypeTableId () const
 
OdDbObjectId getViewTableId () const
 
OdDbObjectId getUCSTableId () const
 
OdDbObjectId getViewportTableId () const
 
OdDbObjectId getRegAppTableId () const
 
OdDbObjectId getDimStyleTableId () const
 
OdDbObjectId getMLStyleDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId getGroupDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId getLayoutDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId getPlotStyleNameDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId getNamedObjectsDictionaryId () const
 
OdDbObjectId getPlotSettingsDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId getColorDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId getMaterialDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId getVisualStyleDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId getTableStyleDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId getScaleListDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId tablestyle () const
 
void setTablestyle (OdDbObjectId objectId)
 
OdDbObjectId getMLeaderStyleDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId mleaderstyle () const
 
void setMLeaderstyle (OdDbObjectId objectId)
 
OdDbObjectId getDetailViewStyleDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId detailViewStyle () const
 
void setDetailViewStyle (OdDbObjectId objectId)
 
OdDbObjectId getSectionViewStyleDictionaryId (bool createIfNotFound=true) const
 
OdDbObjectId sectionViewStyle () const
 
void setSectionViewStyle (OdDbObjectId objectId)
 
OdDbObjectId getRegAppAcadId () const
 
OdDbObjectId getLinetypeContinuousId () const
 
OdDbObjectId getLinetypeByLayerId () const
 
OdDbObjectId getLinetypeByBlockId () const
 
OdDbObjectId getModelSpaceId () const
 
OdDbObjectId getPaperSpaceId () const
 
OdDbObjectId getTextStyleStandardId () const
 
OdDbObjectId getDimStyleStandardId () const
 
OdDbObjectId getLayerZeroId () const
 
OdDbObjectId getLayerDefpointsId (bool createIfNotFound=false) const
 
OdDbObjectId getLayerAdskId (OdDb::LayerAdskType layerType, bool createIfNotFound=false) const
 
OdDbObjectId getSectionManager () const
 
OdDbObjectId getPointCloudDictionaryId () const
 
const OdString classDxfName (const OdRxClass *pClass)
 
OdDbObjectId getOdDbObjectId (const OdDbHandle &objHandle, bool createIfNotFound=false, OdUInt32 xRefId=0)
 
void writeFile (OdStreamBuf *pStreamBuf, OdDb::SaveType fileType, OdDb::DwgVersion fileVersion, bool saveThumbnailImage=false, int dxfPrecision=16)
 
void writeFile (const OdString &filename, OdDb::SaveType fileType, OdDb::DwgVersion fileVersion, bool saveThumbnailImage=false, int dxfPrecision=16)
 
void save (OdStreamBuf *pStreamBuf, bool saveThumbnailImage=false)
 
void save (const OdString &filename, bool saveThumbnailImage=false)
 
void readFile (OdStreamBuf *pStreamBuf, bool partialLoad=false, OdDbAuditInfo *pAuditInfo=0, const OdPassword &password=OdPassword(), bool allowCPConversion=false)
 
void readFile (const OdString &filename, bool partialLoad=false, Oda::FileShareMode shareMode=Oda::kShareDenyWrite, const OdPassword &password=OdPassword(), bool allowCPConversion=false)
 
void closeInput ()
 
OdInt32 approxNumObjects () const
 
OdDb::DwgVersion version (OdDb::MaintReleaseVer *pMaintReleaseVer=0) const
 
OdInt32 numberOfSaves () const
 
OdDb::DwgVersion lastSavedAsVersion (OdDb::MaintReleaseVer *pMaintReleaseVer=0) const
 
OdDb::SaveType originalFileType () const
 
OdDb::DwgVersion originalFileVersion (OdDb::MaintReleaseVer *pMaintReleaseVer=0) const
 
OdDb::DwgVersion originalFileSavedByVersion (OdDb::MaintReleaseVer *pMaintReleaseVer=0) const
 
void addReactor (OdDbDatabaseReactor *pReactor) const
 
void removeReactor (OdDbDatabaseReactor *pReactor) const
 
int dimfit () const
 
int dimunit () const
 
void setDimfit (int val)
 
void setDimunit (int val)
 
void deepCloneObjects (const OdDbObjectIdArray &objectIds, OdDbObjectId ownerId, OdDbIdMapping &idMap, bool deferXlation=false)
 
void wblockCloneObjects (const OdDbObjectIdArray &objectIds, OdDbObjectId ownerId, OdDbIdMapping &idMap, OdDb::DuplicateRecordCloning duplicateRecordCloning, bool deferXlation=false)
 
void abortDeepClone (OdDbIdMapping &idMap)
 
void audit (OdDbAuditInfo *pAuditInfo)
 
virtual void startTransaction ()
 
virtual void endTransaction ()
 
virtual void abortTransaction ()
 
virtual int numActiveTransactions ()
 
virtual void addTransactionReactor (OdDbTransactionReactor *reactor)
 
virtual void removeTransactionReactor (OdDbTransactionReactor *reactor)
 
const voidthumbnailBitmap (OdUInt32 &dataLength) const
 
void setThumbnailBitmap (const void *pBMPData, OdUInt32 dataLength)
 
bool retainOriginalThumbnailBitmap () const
 
void setRetainOriginalThumbnailBitmap (bool retain)
 
void dwgOutFields (OdDbDwgFiler *pFiler) const
 
OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
bool getDIMANNO () const
 
OdDbDate getTDCREATE () const
 
OdDbDate getTDUPDATE () const
 
void resetTimes ()
 
OdResBufPtr getSysVar (const OdString &name) const
 
void setSysVar (const OdString &name, const OdResBuf *pValue)
 
OdDbHandle handseed () const
 
void getDimstyleData (OdDbDimStyleTableRecord *pDestination) const
 
OdResult getDimstyleChildData (const OdRxClass *pDimClass, OdDbDimStyleTableRecord *pRec, OdDbObjectId &style) const
 
OdDbObjectId getDimstyleChildId (const OdRxClass *pDimClass, const OdDbObjectId &parentStyle) const
 
OdDbObjectId getDimstyleParentId (const OdDbObjectId &childStyle) const
 
void setDimstyleData (const OdDbDimStyleTableRecord *pSource)
 
void setDimstyleData (OdDbObjectId objectId)
 
void loadLineTypeFile (const OdString &ltName, const OdString &filename, OdDb::DuplicateLinetypeLoading dlt=OdDb::kDltNotApplicable, OdDb::TextFileEncoding encode=OdDb::kTextFileEncodingDefault)
 
virtual OdString getFilename () const
 
virtual void purge (OdDbObjectIdArray &objectIds) const
 
virtual OdResult purge (OdDbObjectIdGraph &objectIds) const
 
virtual void countHardReferences (const OdDbObjectIdArray &objectIds, OdUInt32 *counts) const
 
OdDbObjectId currentLayoutId () const
 
virtual void setCurrentLayout (const OdString &layoutName)
 
virtual void setCurrentLayout (const OdDbObjectId &layoutId)
 
virtual OdString findActiveLayout (bool allowModel) const
 
virtual OdDbObjectId getActiveLayoutBTRId () const
 
virtual OdDbObjectId findLayoutNamed (const OdString &layoutName) const
 
virtual void deleteLayout (const OdString &layoutName)
 
virtual OdDbObjectId createLayout (const OdString &layoutName, OdDbObjectId *pBlockTableRecId=0)
 
virtual int countLayouts () const
 
virtual void renameLayout (const OdString &oldName, const OdString &newName)
 
void startUndoRecord ()
 
bool hasUndo () const
 
void undo ()
 
void blockUndoRecording (bool bBegin)
 
bool isUndoBlockStarted ()
 
void setUndoMark ()
 
bool hasUndoMark () const
 
void undoBack ()
 
int getUNDOMARKS () const
 
void clearUndo ()
 
bool hasRedo () const
 
void redo ()
 
void auditDatabase (OdDbAuditInfo *pAuditInfo)
 
void applyPartialUndo (OdDbDwgFiler *pUndoFiler, OdRxClass *pClassObj)
 
OdDbDwgFilerundoFiler ()
 
OdDbObjectId insert (const OdString &destinationBlockName, OdDbDatabase *pSource, bool preserveSourceDatabase=true)
 
OdDbObjectId insert (const OdString &sourceBlockName, const OdString &destinationBlockName, OdDbDatabase *pSource, bool preserveSourceDatabase=true)
 
void insert (const OdGeMatrix3d &xfm, OdDbDatabase *pSource, bool preserveSourceDatabase=true)
 
OdDbDatabasePtr wblock (const OdDbObjectIdArray &outObjIds, const OdGePoint3d &basePoint)
 
OdDbDatabasePtr wblock (OdDbObjectId blockId)
 
OdDbDatabasePtr wblock ()
 
OdDbObjectPtr subWblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *) const
 
void setSecurityParams (const OdSecurityParams &secParams, bool setDbMod=true)
 
bool securityParams (OdSecurityParams &secParams) const
 
OdFileDependencyManagerPtr fileDependencyManager () const
 
OdDbObjectContextManagerPtr objectContextManager () const
 
OdDbLayerStateManagergetLayerStateManager () const
 
void updateExt (bool bExact=false)
 
bool isEMR () const
 
OdDbObjectId xrefBlockId () const
 
bool isPartiallyOpened () const
 
bool isDatabaseLoading () const
 
bool isDatabaseConverting () const
 
OdDbAuditInfoauditInfo () const
 
void setCurrentUCS (OdDb::OrthographicView viewType)
 
void setCurrentUCS (const OdDbObjectId &ucsId)
 
void setCurrentUCS (const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis)
 
OdGePoint3d getUCSBASEORG (OdDb::OrthographicView viewType) const
 
void setUCSBASEORG (OdDb::OrthographicView viewType, const OdGePoint3d &origin)
 
OdGePoint3d getPUCSBASEORG (OdDb::OrthographicView viewType) const
 
void setPUCSBASEORG (OdDb::OrthographicView viewType, const OdGePoint3d &origin)
 
void restoreOriginalXrefSymbols ()
 
void restoreForwardingXrefSymbols ()
 
OdDbObjectId byLayerMaterialId () const
 
OdDbObjectId byBlockMaterialId () const
 
OdDbObjectId globalMaterialId () const
 
OdDbObjectId activeViewportId () const
 
virtual OdDbUnitsFormatterformatter ()
 
void enableGraphicsFlush (bool bEnable)
 
void flushGraphics ()
 
bool isMultiThreadedMode () const
 
OdDb::MultiThreadedMode multiThreadedMode () const
 
virtual void setMultiThreadedMode (OdDb::MultiThreadedMode)
 
void setCannoscale (OdDbAnnotationScale *val)
 
OdDbAnnotationScalePtr cannoscale () const
 
OdDbHistoryManagerhistoryManager ()
 
- Public Member Functions inherited from OdDbObject
 ODDB_DECLARE_MEMBERS (OdDbObject)
 
 ~OdDbObject ()
 
void addRef ()
 
void release ()
 
long numRefs () const
 
OdDbObjectId objectId () const
 
OdDbHandle getDbHandle () const
 
OdDbHandle handle () const
 
OdDbObjectId ownerId () const
 
virtual void setOwnerId (OdDbObjectId ownerId)
 
OdDbDatabasedatabase () const
 
void createExtensionDictionary ()
 
OdDbObjectId extensionDictionary () const
 
bool releaseExtensionDictionary ()
 
OdDbXrecordPtr createXrecord (const OdString &xrecordName, OdDb::DuplicateRecordCloning style=OdDb::kDrcIgnore)
 
void upgradeOpen ()
 
void downgradeOpen ()
 
void cancel ()
 
virtual OdResult subOpen (OdDb::OpenMode mode)
 
virtual void subClose ()
 
OdResult erase (bool eraseIt=true)
 
virtual OdResult subErase (bool erasing)
 
void handOverTo (OdDbObject *pNewObject, bool keepXData=true, bool keepExtDict=true)
 
virtual void subHandOverTo (OdDbObject *pNewObject)
 
void swapIdWith (OdDbObjectId otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void subSwapIdWith (const OdDbObjectId &otherId, bool swapXdata=false, bool swapExtDict=false)
 
void dwgIn (OdDbDwgFiler *pFiler)
 
void dwgOut (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfIn (OdDbDxfFiler *pFiler)
 
virtual void dxfOut (OdDbDxfFiler *pFiler) const
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
virtual OdResult dxfInFields_R12 (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields_R12 (OdDbDxfFiler *pFiler) const
 
virtual OdDb::DuplicateRecordCloning mergeStyle () const
 
virtual OdResBufPtr xData (const OdString &regappName=OdString::kEmpty) const
 
virtual void setXData (const OdResBuf *pRb)
 
bool isEraseStatusToggled () const
 
bool isErased () const
 
bool isReadEnabled () const
 
bool isWriteEnabled () const
 
bool isNotifyEnabled () const
 
bool isModified () const
 
bool isModifiedXData () const
 
bool isModifiedGraphics () const
 
bool isNewObject () const
 
bool isNotifying () const
 
bool isUndoing () const
 
bool isReallyClosing () const
 
bool isDBRO () const
 
void assertReadEnabled () const
 
void assertWriteEnabled (bool autoUndo=true, bool recordModified=true)
 
void assertNotifyEnabled () const
 
void disableUndoRecording (bool disable)
 
bool isUndoRecordingDisabled () const
 
OdDbDwgFilerundoFiler ()
 
void addReactor (OdDbObjectReactor *pReactor) const
 
void removeReactor (OdDbObjectReactor *pReactor) const
 
virtual void addPersistentReactor (const OdDbObjectId &objId)
 
virtual void removePersistentReactor (const OdDbObjectId &objId)
 
bool hasPersistentReactor (const OdDbObjectId &objId) const
 
OdDbObjectIdArray getPersistentReactors () const
 
OdDbObjectReactorArray getTransientReactors () const
 
virtual void recvPropagateModify (const OdDbObject *pSubObj)
 
virtual void xmitPropagateModify () const
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr deepClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr wblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
virtual void appendToOwner (OdDbIdPair &idPair, OdDbObject *pOwnerObject, OdDbIdMapping &ownerIdMap)
 
void setOdDbObjectIdsInFlux ()
 
bool isOdDbObjectIdsInFlux () const
 
virtual void copied (const OdDbObject *pObject, const OdDbObject *pNewObject)
 
virtual void erased (const OdDbObject *pObject, bool erasing=true)
 
virtual void goodbye (const OdDbObject *pObject)
 
virtual void openedForModify (const OdDbObject *pObject)
 
virtual void modified (const OdDbObject *pObject)
 
virtual void subObjModified (const OdDbObject *pObject, const OdDbObject *pSubObj)
 
virtual void modifyUndone (const OdDbObject *pObject)
 
virtual void modifiedXData (const OdDbObject *pObject)
 
virtual void unappended (const OdDbObject *pObject)
 
virtual void reappended (const OdDbObject *pObject)
 
bool isAProxy () const
 
virtual void objectClosed (const OdDbObjectId &objectId)
 
virtual void modifiedGraphics (const OdDbObject *pObject)
 
virtual void copyFrom (const OdRxObject *pSource)
 
bool hasSaveVersionOverride () const
 
void setHasSaveVersionOverride (bool hasSaveVersionOverride)
 
virtual OdDb::DwgVersion getObjectSaveVersion (const OdDbFiler *pFiler, OdDb::MaintReleaseVer *pMaintVer=0) const
 
virtual OdDbObjectPtr decomposeForSave (OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
virtual OdDbObjectPtr decomposeForSave (OdDb::SaveType format, OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
void convertForSave (OdDb::DwgVersion ver)
 
virtual void composeForLoad (OdDb::SaveType format, OdDb::DwgVersion version, OdDbAuditInfo *pAuditInfo)
 
virtual OdGiDrawabledrawable ()
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *pTraits) const
 
virtual bool subWorldDraw (OdGiWorldDraw *pWd) const
 
virtual void subViewportDraw (OdGiViewportDraw *pVd) const
 
virtual bool isPersistent () const
 
virtual OdDbStub * id () const
 
ODRX_SEALED_VIRTUAL OdResult getClassID (void *pClsid) const ODRX_SEALED
 
void setGsNode (OdGsCache *pNode)
 
OdGsCachegsNode () const
 
void xDataTransformBy (const OdGeMatrix3d &xfm)
 
bool hasFields () const
 
OdDbObjectId getField (const OdString &fieldName) const
 
OdDbObjectPtr getField (const OdString &fieldName, OdDb::OpenMode mode) const
 
virtual OdDbObjectId setField (const OdString &fieldName, OdDbField *pField)
 
virtual OdResult removeField (OdDbObjectId fieldId)
 
virtual OdDbObjectId removeField (const OdString &fieldName)
 
OdDbObjectId getFieldDictionary () const
 
OdDbObjectPtr getFieldDictionary (OdDb::OpenMode mode) const
 
virtual OdRxClasssaveAsClass (OdRxClass *pClass) const
 
- Public Member Functions inherited from OdGiDrawable
 ODRX_DECLARE_MEMBERS (OdGiDrawable)
 
virtual DrawableType drawableType () const
 
ODRX_SEALED_VIRTUAL OdUInt32 setAttributes (OdGiDrawableTraits *pTraits) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL bool worldDraw (OdGiWorldDraw *pWd) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL void viewportDraw (OdGiViewportDraw *pVd) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdUInt32 viewportDrawLogicalFlags (OdGiViewportDraw *pVd) const ODRX_SEALED
 
virtual OdResult getGeomExtents (OdGeExtents3d &extents) const
 
ODRX_SEALED_VIRTUAL OdUInt32 regenSupportFlags () const ODRX_SEALED
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static bool isValidLineWeight (int weight)
 
static OdDb::LineWeight getNearestLineWeight (int weight)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Protected Member Functions

 OdDbDatabase ()
 
- Protected Member Functions inherited from OdDbObject
 OdDbObject ()
 
virtual OdDbObjectPtr subDeepClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const
 
virtual OdDbObjectPtr subWblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const
 
- Protected Member Functions inherited from OdGiDrawable
 OdGiDrawable ()
 
virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const
 
virtual OdUInt32 subRegenSupportFlags () const
 

Friends

class OdDbDatabaseImpl
 

Additional Inherited Members

- Public Types inherited from OdGiDrawable
enum  SetAttributesFlags {
  kDrawableNone = 0, kDrawableIsAnEntity = 1, kDrawableUsesNesting = 2, kDrawableIsCompoundObject = 4,
  kDrawableViewIndependentViewportDraw = 8, kDrawableIsInvisible = 16, kDrawableHasAttributes = 32, kDrawableRegenTypeDependantGeometry = 64,
  kDrawableIsDimension = (kDrawableIsAnEntity + kDrawableIsCompoundObject + 128), kDrawableRegenDraw = 256, kDrawableStandardDisplaySingleLOD = 512, kDrawableShadedDisplaySingleLOD = 1024,
  kDrawableViewDependentViewportDraw = 2048, kDrawableBlockDependentViewportDraw = 4096, kDrawableIsExternalReference = 8192, kDrawableNotPlottable = 16384,
  kLastFlag = kDrawableNotPlottable
}
 
enum  DrawableType {
  kGeometry = 0, kDistantLight = 1, kPointLight = 2, kSpotLight = 3,
  kAmbientLight, kSolidBackground, kGradientBackground, kImageBackground,
  kGroundPlaneBackground, kViewport, kWebLight, kSkyBackground,
  kImageBasedLightingBackground
}
 
- Protected Attributes inherited from OdDbObject
OdDbObjectImplm_pImpl
 

Detailed Description

This class represents a complete drawing file.

See also
TD_Db

<group OdDb_Classes>

Definition at line 420 of file DbDatabase.h.

Constructor & Destructor Documentation

◆ OdDbDatabase()

OdDbDatabase::OdDbDatabase ( )
protected

◆ ~OdDbDatabase()

virtual OdDbDatabase::~OdDbDatabase ( )
virtual

Destroys a database instance.

Member Function Documentation

◆ abortDeepClone()

void OdDbDatabase::abortDeepClone ( OdDbIdMapping idMap)

Terminates a call to deepCloneObjects() or wblockCloneObjects().

Parameters
idMap[in/out] ID map of the function call to be terminated.
Remarks
Parameter idMap associates the object IDs of the original objects with the object IDs of the newly created clones.

This call is necessary only when a call to deepCloneObjects() or wblockCloneObjects() is made with deferXlation == true, and no call will be made with deferXlation == false.

◆ abortTransaction()

virtual void OdDbDatabase::abortTransaction ( )
virtual

Aborts the current transaction associated with this database object.

Remarks
This function initiates an immediate rollback of all changes to objects since the start of the current transaction. This rollback occurs for all transaction-resident objects.

◆ activeViewportId()

OdDbObjectId OdDbDatabase::activeViewportId ( ) const

Returns the identifier of the active viewport for this database.

◆ addOdDbObject()

OdDbObjectId OdDbDatabase::addOdDbObject ( OdDbObject pObject,
OdDbObjectId  ownerId = OdDbObjectId::kNull,
OdDbHandle  handle = 0 
)

Adds an object to this database object, and returns its Object ID.

Parameters
pObject[in] Pointer to the object.
ownerId[in] Object ID of the owner of pObject.
handle[in] Handle for pObject.
Remarks
A unique handle will be generated if a handle is not supplied or is 0.

◆ addReactor()

void OdDbDatabase::addReactor ( OdDbDatabaseReactor pReactor) const

Adds the specified reactor to this object's reactor list.

Parameters
pReactor[in] Pointer to the reactor object.

◆ addRef()

void OdDbDatabase::addRef ( )
virtual

Declares the method incrementing the reference counter in objects derived from this class.

Remarks
It is the pure virtual method that does not have an implementation. You must redefine it in the derived class.
See also
<link smart_pointers_overview.html, Overview of Smart Pointer Classes>

Implements OdRxObject.

◆ addTransactionReactor()

virtual void OdDbDatabase::addTransactionReactor ( OdDbTransactionReactor reactor)
virtual

Adds a transaction reactor to this database object.

Parameters
reactor[in] Transaction reactor.

◆ applyPartialUndo()

void OdDbDatabase::applyPartialUndo ( OdDbDwgFiler pUndoFiler,
OdRxClass pClassObj 
)
virtual

Applies a partial undo operation.

Parameters
pUndoFiler[in] Object used for perfoming input/output operations.
pClassObj[in] A pointer to an object for perfoming undo actions.

Reimplemented from OdDbObject.

◆ approxNumObjects()

OdInt32 OdDbDatabase::approxNumObjects ( ) const

Returns the approximate number of objects in this database object.

Remarks
This function returns a value greater than or equal to the number of objects in this database object.

This number is used to construct an OdDbObjectIdArray that can hold all the objects in the database, avoiding memory fragmentation and increasing performance.

◆ appServices()

OdDbHostAppServices* OdDbDatabase::appServices ( ) const

Returns the OdDbHostAppServices object associated with this database object.

◆ audit()

void OdDbDatabase::audit ( OdDbAuditInfo pAuditInfo)
virtual

Performs an audit operation on the header of this database object.

Parameters
pAuditInfo[in] Pointer to an OdDbAuditInfo object.
Remarks
The specified OdDbAuditInfo object controls the audit and receives the audit status.

Reimplemented from OdDbObject.

◆ auditDatabase()

void OdDbDatabase::auditDatabase ( OdDbAuditInfo pAuditInfo)

Performs an audit operation on the this entire database object.

Parameters
pAuditInfo[in] Pointer to an AuditInfo object.
Remarks
The specified AuditInfo object controls the audit and receives the audit status.

◆ auditInfo()

OdDbAuditInfo* OdDbDatabase::auditInfo ( ) const

Returns the pointer to OdDbAuditInfo if the database is being loaded from a file in recover modem, otherwise returns Null.

◆ blockUndoRecording()

void OdDbDatabase::blockUndoRecording ( bool  bBegin)

Blocks or unblocks undo history recording.

Parameters
bBegin[in] A flag determining whether undo history recording is blocked (if true) or not (if false).

◆ byBlockMaterialId()

OdDbObjectId OdDbDatabase::byBlockMaterialId ( ) const

Returns the identifier of the by-block material for this database.

◆ byLayerMaterialId()

OdDbObjectId OdDbDatabase::byLayerMaterialId ( ) const

Returns the identifier of the by-layer material for this database.

◆ cannoscale()

OdDbAnnotationScalePtr OdDbDatabase::cannoscale ( ) const

Returns the current annotation scale as a context object for this database.

See also
OdDbAnnotationScale

◆ classDxfName()

const OdString OdDbDatabase::classDxfName ( const OdRxClass pClass)

Returns the class DXF name for the specified class.

Parameters
pClass[in] Pointer to the class object.
See also
OdRxClass

◆ clearUndo()

void OdDbDatabase::clearUndo ( )

Clears undo history.

◆ closeInput()

void OdDbDatabase::closeInput ( )

Forces all data to be loaded from the input file associated with this database object, and closes the file.

Remarks
Client applications will normally not need to call this function.

◆ countHardReferences()

virtual void OdDbDatabase::countHardReferences ( const OdDbObjectIdArray objectIds,
OdUInt32 counts 
) const
virtual

Returns a count of hard references to each of the specified object IDs.

Parameters
objectIds[in] Array of object IDs.
counts[out] Receives an array of hard reference counts.
Remarks
counts must be the same size as objectIds.

Each element of counts will be incremented for each hard reference of the corresponding objectId. The caller must initialize the elements of count to zero or an appropriate value before calling this function.

◆ countLayouts()

virtual int OdDbDatabase::countLayouts ( ) const
virtual

Returns the number of layouts in this database object.

◆ createLayout()

virtual OdDbObjectId OdDbDatabase::createLayout ( const OdString layoutName,
OdDbObjectId pBlockTableRecId = 0 
)
virtual

Creates a new layout with the specified name in this database object.

Remarks
The newly created layout is added to this database object along with its newly created associated OdDbBlockTableRecord.
Parameters
layoutName[in] Layout name.
pBlockTableRecId[in] Pointer to the BlockTableRecID to receive the object ID of the new BlockTableRecord object.

◆ currentLayoutId()

OdDbObjectId OdDbDatabase::currentLayoutId ( ) const

Returns the object ID of the active layout of this database object.

◆ deepCloneObjects()

void OdDbDatabase::deepCloneObjects ( const OdDbObjectIdArray objectIds,
OdDbObjectId  ownerId,
OdDbIdMapping idMap,
bool  deferXlation = false 
)

Deep clones a set of objects and appends the clones to the specified owner object.

Parameters
objectIds[in] Array of object IDs of the objects to be cloned.
ownerId[in] Object ID of owner object.
idMap[in/out] ID map.
deferXlation[in] Defer translation.
Remarks
idMap associates the object IDs of the original objects with the object IDs of the newly created clones.

When cloning objects with different owner IDs, a separate call to this function is required for each ownerId. In this case, all but the final call to this function should be made with deferXlation == true. This defers translation until all objects have been cloned.

A deep clone is a clone of the specified objects and everything they own.

See also
wblockCloneObjects()

◆ deleteLayout()

virtual void OdDbDatabase::deleteLayout ( const OdString layoutName)
virtual

Deletes the specified layout from this database object.

Parameters
layoutName[in] Layout name.

◆ detailViewStyle()

OdDbObjectId OdDbDatabase::detailViewStyle ( ) const

Returns the object ID of the current DetailViewStyle of this database object.

◆ dimfit()

int OdDbDatabase::dimfit ( ) const

Returns the R14 DIMFIT system variable of this database object.

Remarks
The DIMATFIT and DIMTMOVE values will be converted to DIMFIT. The complete mapping is as follows:

DIMAFIT DIMFIT 0 0 0 0 1 1 0 2 2 0 3 3 1 0 4 1 1 4 1 2 4 1 3 4 2 0 5 2 1 5 2 2 5 2 3 5

◆ dimunit()

int OdDbDatabase::dimunit ( ) const

Returns the R14 DIMUNIT system variable of this database object.

Remarks
The DIMLUNIT and DIMFRAC values will be converted to DIMUNIT. The complete mapping is as follows:

DIMLUNIT DIMUNIT 0 1 1 0 2 2 0 3 3 0 4 4 0 5 5 0 6 8 1 1 1 1 2 2 1 3 3 1 4 4 1 5 5 1 6 8 2 1 1 2 2 2 2 3 3 2 4 6 2 5 7 2 6 8

All other input combinations return 2.

◆ dwgInFields()

OdResult OdDbDatabase::dwgInFields ( OdDbDwgFiler pFiler)
virtual

Reads the .dwg file data of this object.

Parameters
pFiler[in] Filer object from which data are read.
Returns
Returns the filer status.

This function is called by dwgIn() to allow the object to read its data.

When overriding this function:

1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dwgInFields(pFiler) returned. 4) Call the OdDbDwgFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().

Reimplemented from OdDbObject.

◆ dwgOutFields()

void OdDbDatabase::dwgOutFields ( OdDbDwgFiler pFiler) const
virtual

Writes the .dwg file data of this object.

Parameters
pFiler[in] Pointer to the filer to which data are written.
Remarks

This function is called by dwgIn() to allow the object to write its data.

When overriding this function:

1) Call assertReadEnabled(). 2) Call the parent class's dwgOutFields(pFiler). 3) Call the OdDbDwgFiler(pFiler) methods to write each of the object's data items in the order they were written.

Reimplemented from OdDbObject.

◆ enableGraphicsFlush()

void OdDbDatabase::enableGraphicsFlush ( bool  bEnable)

Enables graphics flushing.

Parameters
bEnable[in] A flag which determines whether graphic flushing is enabled (true) or not (false).

◆ endTransaction()

virtual void OdDbDatabase::endTransaction ( )
virtual

Ends the current transaction associated with this database object.

Remarks
This function commits all changes to objects since the start of the current transaction.

◆ fileDependencyManager()

OdFileDependencyManagerPtr OdDbDatabase::fileDependencyManager ( ) const

Returns the OdFileDependencyManager object of this database object.

◆ findActiveLayout()

virtual OdString OdDbDatabase::findActiveLayout ( bool  allowModel) const
virtual

Returns the name of the active layout of this database object.

Parameters
allowModel[in] If and only if true, allows the ModelSpace layout name to be returned.
Remarks
If allowModel == false, an empty string will be returned if the active layout is ModelSpace.

◆ findLayoutNamed()

virtual OdDbObjectId OdDbDatabase::findLayoutNamed ( const OdString layoutName) const
virtual

Returns the object ID of the specified layout in this database object.

Parameters
layoutName[in] Layout name.
Remarks
Returns a null object ID if the specified layout is not found.

◆ flushGraphics()

void OdDbDatabase::flushGraphics ( )

Flushes the graphics in this database.

◆ formatter()

virtual OdDbUnitsFormatter& OdDbDatabase::formatter ( )
virtual

Returns the current formatter for units in this database.

◆ getActiveLayoutBTRId()

virtual OdDbObjectId OdDbDatabase::getActiveLayoutBTRId ( ) const
virtual

Returns the object ID of the BlockTableRecord associated with the active layout of this database object.

◆ getBlockTableId()

OdDbObjectId OdDbDatabase::getBlockTableId ( ) const

Returns the object ID of the BlockTable of this database object.

◆ getColorDictionaryId()

OdDbObjectId OdDbDatabase::getColorDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the Color dictionary of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ getDetailViewStyleDictionaryId()

OdDbObjectId OdDbDatabase::getDetailViewStyleDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the DetailViewStyle dictionary of this database object.

Parameters
createIfNotFound[in] Determines whether to create a DetailViewStyle dictionary if it does not exist.

◆ getDIMANNO()

bool OdDbDatabase::getDIMANNO ( ) const

Returns true if current dimension style is annotative.

◆ getDimstyleChildData()

OdResult OdDbDatabase::getDimstyleChildData ( const OdRxClass pDimClass,
OdDbDimStyleTableRecord pRec,
OdDbObjectId style 
) const

Returns the child dimension style data and dimension style object identifier.

Parameters
pDimClass[in] A pointer to a dimension class instance.
pRec[out] A pointer to an output dimension styles table record, which should contain child dimension style data after the method returns the control.
style[out] Identifier of the output style object.
Returns
Returns eOk if style data has been retrieved successfully or an error code in the other case.
Remarks
The method returns parent style information and identifier if the child style can not be retrieved.

◆ getDimstyleChildId()

OdDbObjectId OdDbDatabase::getDimstyleChildId ( const OdRxClass pDimClass,
const OdDbObjectId parentStyle 
) const

Returns the identifier of the child dimension style.

Parameters
pDimClass[in] A pointer to a dimension class instance.
parentStyle[in] A parent dimension style object identifier.
Remarks
The method returns the parent dimension identifier if the child style can not be retrieved.

◆ getDimstyleData()

void OdDbDatabase::getDimstyleData ( OdDbDimStyleTableRecord pDestination) const

Copies the dimension variables of this database object to the specified DimStyleTableRecord.

Parameters
pDestination[in] Pointer to the destination record.

◆ getDimstyleParentId()

OdDbObjectId OdDbDatabase::getDimstyleParentId ( const OdDbObjectId childStyle) const

Returns the identifier of the parent dimension style.

Parameters
childStyle[in] A child dimension style object identifier.
Remarks
The method returns the child dimension identifier if the parent style can not be retrieved.

◆ getDimStyleStandardId()

OdDbObjectId OdDbDatabase::getDimStyleStandardId ( ) const

Returns the object ID of the "Standard" dimension style object of this database object.

◆ getDimStyleTableId()

OdDbObjectId OdDbDatabase::getDimStyleTableId ( ) const

Returns the object ID of the DimStyleTable of this database object.

◆ getFilename()

virtual OdString OdDbDatabase::getFilename ( ) const
virtual

Returns the name of the file associated with this database object.

◆ getGroupDictionaryId()

OdDbObjectId OdDbDatabase::getGroupDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the Group dictionary of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ getLayerAdskId()

OdDbObjectId OdDbDatabase::getLayerAdskId ( OdDb::LayerAdskType  layerType,
bool  createIfNotFound = false 
) const

Returns the object ID of the specified system layer object of this database object.

Parameters
layerType[in] Type of system layer.
createIfNotFound[in] Controls the creation of the object if it does not exist.
Remarks
layerType must be one of the following:

Value Layer name OdDb::kLayerSystemLights 0 *ADSK_SYSTEM_LIGHTS OdDb::kLayerConstraints 1 *ADSK_CONSTRAINTS

◆ getLayerDefpointsId()

OdDbObjectId OdDbDatabase::getLayerDefpointsId ( bool  createIfNotFound = false) const

Returns the object ID of the "DEFPOINTS" layer object of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ getLayerStateManager()

OdDbLayerStateManager* OdDbDatabase::getLayerStateManager ( ) const

Returns the OdDbLayerStateManager object of this database object.

◆ getLayerTableId()

OdDbObjectId OdDbDatabase::getLayerTableId ( ) const

Returns the object ID of the LayerTable of this database object.

◆ getLayerZeroId()

OdDbObjectId OdDbDatabase::getLayerZeroId ( ) const

Returns the object ID of the "0" layer object of this database object.

◆ getLayoutDictionaryId()

OdDbObjectId OdDbDatabase::getLayoutDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the Layout dictionary of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ getLinetypeByBlockId()

OdDbObjectId OdDbDatabase::getLinetypeByBlockId ( ) const

Returns the object ID of the "ByBlock" Linetype object of this database object.

◆ getLinetypeByLayerId()

OdDbObjectId OdDbDatabase::getLinetypeByLayerId ( ) const

Returns the object ID of the "ByLayer" Linetype object of this database object.

◆ getLinetypeContinuousId()

OdDbObjectId OdDbDatabase::getLinetypeContinuousId ( ) const

Returns the object ID of the "Continuous" Linetype object of this database object.

◆ getLinetypeTableId()

OdDbObjectId OdDbDatabase::getLinetypeTableId ( ) const

Returns the object ID of the LinetypeTable of this database object.

◆ getMaterialDictionaryId()

OdDbObjectId OdDbDatabase::getMaterialDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the Material dictionary of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ getMLeaderStyleDictionaryId()

OdDbObjectId OdDbDatabase::getMLeaderStyleDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the MLeaderStyle dictionary of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ getMLStyleDictionaryId()

OdDbObjectId OdDbDatabase::getMLStyleDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the MLineStyle dictionary of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ getModelSpaceId()

OdDbObjectId OdDbDatabase::getModelSpaceId ( ) const

Returns the object ID of the ModelSpace Block object of this database object.

◆ getNamedObjectsDictionaryId()

OdDbObjectId OdDbDatabase::getNamedObjectsDictionaryId ( ) const

Returns the object ID of the NamedObjects dictionary of this database object.

◆ getNearestLineWeight()

static OdDb::LineWeight OdDbDatabase::getNearestLineWeight ( int  weight)
static

Requires a lineweight and returns the nearest OdDb::LineWeight enum number for this database. For example, when the passed value is 8, the returned value is kLnWt009.

Parameters
weight[in] The lineweight value.

◆ getOdDbObjectId()

OdDbObjectId OdDbDatabase::getOdDbObjectId ( const OdDbHandle objHandle,
bool  createIfNotFound = false,
OdUInt32  xRefId = 0 
)

Returns the object ID corresponding to the specified handle object in this database.

Parameters
objHandle[in] Database handle.
createIfNotFound[in] Controls the creation of the object if it does not exist.
xRefId[in] Not used.
Remarks
If objHandle is 0, this function will create a new unique handle and return a newly created object ID corresponding to this handle.
createIfNotFound is for Teigha internal use only and should always be false for Teigha applications.
See also
OdDbObjectId

◆ getPaperSpaceId()

OdDbObjectId OdDbDatabase::getPaperSpaceId ( ) const

Returns the object ID of the PaperSpace Block object of this database object.

◆ getPlotSettingsDictionaryId()

OdDbObjectId OdDbDatabase::getPlotSettingsDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the PlotSettings dictionary of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ getPlotStyleNameDictionaryId()

OdDbObjectId OdDbDatabase::getPlotStyleNameDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the PlotStyleName dictionary of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ getPointCloudDictionaryId()

OdDbObjectId OdDbDatabase::getPointCloudDictionaryId ( ) const

Returns the object ID of the point cloud dictionary.

Remarks
The ID may be null if the database has never contained any point clouds.

◆ getPUCSBASEORG()

OdGePoint3d OdDbDatabase::getPUCSBASEORG ( OdDb::OrthographicView  viewType) const

Returns the UCS origin and orthographic view type for the current PaperSpace UCS.

Parameters
viewType[in] Orthographic view type.
Remarks
viewType must be one of the following:

Value View type OdDb::kNonOrthoView 0 Non-orthographic with respect to the UCS OdDb::kTopView 1 Top view with respect to the UCS OdDb::kBottomView 2 Bottom view with respect to the UCS OdDb::kFrontView 3 Front view with respect to the UCS OdDb::kBackView 4 Back view with respect to the UCS OdDb::kLeftView 5 Left view with respect to the UCS OdDb::kRightView 6 Right view with respect to the UCS

◆ getRegAppAcadId()

OdDbObjectId OdDbDatabase::getRegAppAcadId ( ) const

Returns the object ID of the "ACAD" RegApp object of this database object.

◆ getRegAppTableId()

OdDbObjectId OdDbDatabase::getRegAppTableId ( ) const

Returns the object ID of the RegAppTable of this database object.

◆ getScaleListDictionaryId()

OdDbObjectId OdDbDatabase::getScaleListDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the ScaleList dictionary of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ getSectionManager()

OdDbObjectId OdDbDatabase::getSectionManager ( ) const

Returns the object ID of the section manager.

Remarks
The ID may be null if the database has never contained any section planes.

◆ getSectionViewStyleDictionaryId()

OdDbObjectId OdDbDatabase::getSectionViewStyleDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the SectionViewStyle dictionary of this database object.

Parameters
createIfNotFound[in] Determines whether to create a SectionViewStyle dictionary if it does not exist.

◆ getSysVar()

OdResBufPtr OdDbDatabase::getSysVar ( const OdString name) const

Returns the specified system variable of this database object.

Parameters
name[in] Name of the system variable.
Returns
Returns a smart pointer to an OdResBuf object that contains the value.

System variable names are case-insensitive strings.

See also
System Variables

◆ getTableStyleDictionaryId()

OdDbObjectId OdDbDatabase::getTableStyleDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the TableStyle dictionary of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ getTDCREATE()

OdDbDate OdDbDatabase::getTDCREATE ( ) const

Returns the TDCREATE system variable of this database object.

Remarks
TDUCREATE represents the time and date, in local time, that the database was created.

◆ getTDUPDATE()

OdDbDate OdDbDatabase::getTDUPDATE ( ) const

Returns the TDUPDATE system variable of this database object.

Remarks
TDUUPDATE represents the time and date, in local time, that the database was last saved.

◆ getTextStyleStandardId()

OdDbObjectId OdDbDatabase::getTextStyleStandardId ( ) const

Returns the object ID of the "Standard" text style object of this database object.

◆ getTextStyleTableId()

OdDbObjectId OdDbDatabase::getTextStyleTableId ( ) const

Returns the object ID of the TextStyleTable of this database object.

◆ getUCSBASEORG()

OdGePoint3d OdDbDatabase::getUCSBASEORG ( OdDb::OrthographicView  viewType) const

Returns the UCS origin and orthographic view type for the current UCS.

Parameters
viewType[in] Orthographic view type.
Remarks
viewType must be one of the following:

Value View type OdDb::kNonOrthoView 0 Non-orthographic with respect to the UCS OdDb::kTopView 1 Top view with respect to the UCS OdDb::kBottomView 2 Bottom view with respect to the UCS OdDb::kFrontView 3 Front view with respect to the UCS OdDb::kBackView 4 Back view with respect to the UCS OdDb::kLeftView 5 Left view with respect to the UCS OdDb::kRightView 6 Right view with respect to the UCS

◆ getUCSTableId()

OdDbObjectId OdDbDatabase::getUCSTableId ( ) const

Returns the object ID of the UCSTable of this database object.

◆ getUNDOMARKS()

int OdDbDatabase::getUNDOMARKS ( ) const

Returns the quantity of undo markers.

◆ getViewportTableId()

OdDbObjectId OdDbDatabase::getViewportTableId ( ) const

Returns the object ID of the ViewportTable of this database object.

◆ getViewTableId()

OdDbObjectId OdDbDatabase::getViewTableId ( ) const

Returns the object ID of the ViewTable of this database object.

◆ getVisualStyleDictionaryId()

OdDbObjectId OdDbDatabase::getVisualStyleDictionaryId ( bool  createIfNotFound = true) const

Returns the object ID of the VisualStyle dictionary of this database object.

Parameters
createIfNotFound[in] Controls the creation of the object if it does not exist.

◆ globalMaterialId()

OdDbObjectId OdDbDatabase::globalMaterialId ( ) const

Returns the identifier of the global material for this database.

◆ handseed()

OdDbHandle OdDbDatabase::handseed ( ) const

Returns the next available handle number of this database object.

Remarks
Use OdDbHandle::getIntoAsciiBuffer() to return the hex string version of the handle.

◆ hasRedo()

bool OdDbDatabase::hasRedo ( ) const

Returns true if redo information exists for this database object.

◆ hasUndo()

bool OdDbDatabase::hasUndo ( ) const

Returns true if undo information exists for this database object.

◆ hasUndoMark()

bool OdDbDatabase::hasUndoMark ( ) const

Returns whether an undo marker has been set on this database object (returns true) or not (returns false).

◆ historyManager()

OdDbHistoryManager* OdDbDatabase::historyManager ( )

Returns the current history manager for this database.

◆ initialize() [1/2]

void OdDbDatabase::initialize ( OdDb::MeasurementValue  measurement,
bool  bVisualStyles 
)

◆ initialize() [2/2]

void OdDbDatabase::initialize ( OdDb::MeasurementValue  measurement = OdDb::kEnglish)

Adds the default set of objects and settings to this database object.

Remarks
This includes the ModelSpace and PaperSpace blocks, default table entries, system variable settings, etc.
Measurement must be one the following:

Value OdDb::kEnglish 0 OdDb::kMetric 1

Parameters
measurement[in] Units of measurement.

◆ insert() [1/3]

void OdDbDatabase::insert ( const OdGeMatrix3d xfm,
OdDbDatabase pSource,
bool  preserveSourceDatabase = true 
)

Copies the content of a specified database to this database.

Parameters
xfm[in] Transformation matrix.
pSource[in] Source database.
preserveSourceDatabase[in] Not used. Objects from the source database are always copied, not moved.
Remarks
The data that will be copied includes content of the folloowing enities: BlockTable LayerTable LinetypeTable DimStyleTable RegAppTable TextStyleTable PlotStyleNameDictionary PlotSettingsDictionary MLStyleDictionary ColorDictionary MaterialDictionary TableStyleDictionary MLeaderStyleDictionary ScaleListDictionary VisualStyleDictionary GroupDictionary

Unlike the wblockCloneObjects() method, insert() also copies the sortens table. While copying duplicate objects, names will be ignored; a destination object that has the same name as the source object will be rewritten by the source one.

All model space entities in pSource are copied into model space of this database object and transformed by xfm.

◆ insert() [2/3]

OdDbObjectId OdDbDatabase::insert ( const OdString destinationBlockName,
OdDbDatabase pSource,
bool  preserveSourceDatabase = true 
)

Copies the content of a specified database to this database.

Parameters
destinationBlockName[in] Name for the new OdDbBlockTableRecord.
pSource[in] Source database.
preserveSourceDatabase[in] Not used. Objects from the source database are always copied, not moved.
Remarks
The data that will be copied includes content of the following enities: BlockTable LayerTable LinetypeTable DimStyleTable RegAppTable TextStyleTable PlotStyleNameDictionary PlotSettingsDictionary MLStyleDictionary ColorDictionary MaterialDictionary TableStyleDictionary MLeaderStyleDictionary ScaleListDictionary VisualStyleDictionary GroupDictionary

Unlike the wblockCloneObjects() method, insert() also copies the sortens table. While copying duplicate objects, names will be ignored; a destination object that has the same name as the source object will be rewritten by the source one.

A new OdDbBlockTableRecord is created and all model space entities of pSource are copied into the new block.

◆ insert() [3/3]

OdDbObjectId OdDbDatabase::insert ( const OdString sourceBlockName,
const OdString destinationBlockName,
OdDbDatabase pSource,
bool  preserveSourceDatabase = true 
)

Copies the content of a specified database to this database.

Parameters
sourceBlockName[in] Name of the OdDbBlockTableRecord in pSource.
destinationBlockName[in] Name for the new OdDbBlockTableRecord.
pSource[in] Source database.
preserveSourceDatabase[in] Not used. Objects from the source database are always copied, not moved.
Remarks
The data that will be copied includes content of the folloowing enities: BlockTable, LayerTable LinetypeTable DimStyleTable RegAppTable TextStyleTable PlotStyleNameDictionary PlotSettingsDictionary MLStyleDictionary ColorDictionary MaterialDictionary TableStyleDictionary MLeaderStyleDictionary ScaleListDictionary VisualStyleDictionary GroupDictionary

Unlike the wblockCloneObjects() method, insert() also copies the sortens table. While copying duplicate objects, names will be ignored; a destination object that has the same name as the source object will be rewritten by the source one.

All entities in the BlockTableRecord specified by sourceBlockName in pSource are copied into the new OdDbBlockTableRecord and offset by the INSBASE value. Contents of layout blocks are copied only if sourceBlockName is a layout block name.

◆ isDatabaseConverting()

bool OdDbDatabase::isDatabaseConverting ( ) const

Returns true if and only if this database object is being converted after loading from a file or before saving to a file.

◆ isDatabaseLoading()

bool OdDbDatabase::isDatabaseLoading ( ) const

Returns true if and only if this database object is being loaded from a file.

◆ isEMR()

bool OdDbDatabase::isEMR ( ) const

Returns true if and only if this database object was created by an educational version of the application.

◆ isMultiThreadedMode()

bool OdDbDatabase::isMultiThreadedMode ( ) const

If multi-threaded mode is on, the method returns true. In the other case it returns false.

◆ isPartiallyOpened()

bool OdDbDatabase::isPartiallyOpened ( ) const

Returns true if and only if this database object is partially opened.

◆ isUndoBlockStarted()

bool OdDbDatabase::isUndoBlockStarted ( )

Returns whether undo history recording has been blocked (returns true) or not (returns false).

◆ isValidLineWeight()

static bool OdDbDatabase::isValidLineWeight ( int  weight)
static

Requires a lineweight and returns True if the specified lineweight is valid, that is, one of the predefined lineweights in this database, or False otherwise.

Parameters
weight[in] The lineweight value.

◆ lastSavedAsVersion()

OdDb::DwgVersion OdDbDatabase::lastSavedAsVersion ( OdDb::MaintReleaseVer pMaintReleaseVer = 0) const

Returns the version to which this database object was last saved.

Parameters
pMaintReleaseVer[in] Pointer to the MaintReleaseVer object to receive the maintenance release version.
Remarks
The maintenance release version is returned if and only if pMaintReleaseVer != 0.

◆ loadLineTypeFile()

void OdDbDatabase::loadLineTypeFile ( const OdString ltName,
const OdString filename,
OdDb::DuplicateLinetypeLoading  dlt = OdDb::kDltNotApplicable,
OdDb::TextFileEncoding  encode = OdDb::kTextFileEncodingDefault 
)

Loads a linetype into this database object.

Parameters
ltName[in] Name of the linetype to load.
filename[in] Name of the linetype file from which to load.
encode[in] Encoding used in linetype text file (if known).
Remarks
Wildcards are permitted in ltName; if "*" is specified, all linetypes from the filename will be loaded.

dlt must be one of the following:

Value Description OdDb::kDltNotApplicable 0 Not Applicable. OdDb::kDltIgnore 1 Ignore duplicate linetypes. OdDb::kDltReplace 2 Replace duplicate linetypes.

Throws: An appropriate error if not successful.

◆ mleaderstyle()

OdDbObjectId OdDbDatabase::mleaderstyle ( ) const

Returns the object ID of the current MLeaderStyle of this database object.

◆ multiThreadedMode()

OdDb::MultiThreadedMode OdDbDatabase::multiThreadedMode ( ) const

Returns which multi-threaded mode the database currently uses.

Remarks
Returns one of the following values:
Value Multi-Threaded mode OdDb::MultiThreadedMode::kSTMode 0 No multi-threaded, uses single-threaded mode. OdDb::MultiThreadedMode::kMTRendering 1 Multi-threaded rendering. OdDb::MultiThreadedMode::kMTLoading 2 Multi-threaded data loading.

◆ newRegApp()

bool OdDbDatabase::newRegApp ( const OdString regAppName)

Adds the specified name to the APPID table of this database object.

Parameters
regAppName[in] Application name.
Remarks
True if and only if the specified name had not been, and is now, in the APPID table.

◆ numActiveTransactions()

virtual int OdDbDatabase::numActiveTransactions ( )
virtual

Returns the number of active transactions associated with this database object.

◆ numberOfSaves()

OdInt32 OdDbDatabase::numberOfSaves ( ) const

Returns the number of times this database object has been saved since it was opened.

Remarks
This number can be zero.

◆ objectContextManager()

OdDbObjectContextManagerPtr OdDbDatabase::objectContextManager ( ) const

Returns the OdDbObjectContextManager object of this database object.

◆ ODRX_DECLARE_MEMBERS()

OdDbDatabase::ODRX_DECLARE_MEMBERS ( OdDbDatabase  )

◆ originalFileSavedByVersion()

OdDb::DwgVersion OdDbDatabase::originalFileSavedByVersion ( OdDb::MaintReleaseVer pMaintReleaseVer = 0) const

Returns the version of the application that created the file from which this database object was read.

Parameters
pMaintReleaseVer[in] Pointer to the MaintReleaseVer object to receive the maintenance release version.
Remarks
The maintenance release version is returned if and only if pMaintReleaseVer != 0.

◆ originalFileType()

OdDb::SaveType OdDbDatabase::originalFileType ( ) const

Returns the filetype of the file from which this database object was read.

Remarks
originalFileType() returns one of the following:

Value Description OdDb::kDwg 0 .dwg file. OdDb::kDxf 0 .dxf file.

◆ originalFileVersion()

OdDb::DwgVersion OdDbDatabase::originalFileVersion ( OdDb::MaintReleaseVer pMaintReleaseVer = 0) const

Returns the version of the file from which this database object was read.

Parameters
pMaintReleaseVer[in] Pointer to the MaintReleaseVer object to receive the maintenance release version.
Remarks
The maintenance release version is returned if and only if pMaintReleaseVer != 0.

◆ purge() [1/2]

virtual void OdDbDatabase::purge ( OdDbObjectIdArray objectIds) const
virtual

Removes the object IDs from the specified array that are hard referenced in this database object.

Parameters
objectIds[in/out] Array of object IDs.
Remarks
Any remaining object IDs can be safely erased. This function does not modify this database object.

◆ purge() [2/2]

virtual OdResult OdDbDatabase::purge ( OdDbObjectIdGraph objectIds) const
virtual

Removes the object IDs from the specified array that are hard referenced in this database object.

Parameters
objectIds[in/out] Array of object IDs.
Returns
Returns eOk if the removal is successful or an appropriate error code in the other case.
Remarks
Any remaining object IDs can be safely erased. This function does not modify this database object.

◆ readFile() [1/2]

void OdDbDatabase::readFile ( const OdString filename,
bool  partialLoad = false,
Oda::FileShareMode  shareMode = Oda::kShareDenyWrite,
const OdPassword password = OdPassword(),
bool  allowCPConversion = false 
)
inline

Reads the contents of the specified drawing file into this database object.

Parameters
filename[in] Name of the file from which the data is to be read.
shareMode[in] Share mode to use when opening the specified file.
Remarks
shareMode must be one of the following:

Value Description Oda::kShareDenyReadWrite 0x10 deny read/write mode Oda::kShareDenyWrite 0x20 deny write mode Oda::kShareDenyRead 0x30 deny read mode Oda::kShareDenyNo 0x40 deny none mode

Definition at line 978 of file DbDatabase.h.

◆ readFile() [2/2]

void OdDbDatabase::readFile ( OdStreamBuf pStreamBuf,
bool  partialLoad = false,
OdDbAuditInfo pAuditInfo = 0,
const OdPassword password = OdPassword(),
bool  allowCPConversion = false 
)

Reads the contents of the specified StreamBuf object or file into this database object.

Parameters
pStreamBuf[in] Pointer to the StreamBuf object from which the data is to be read.
partialLoad[in] Controls the partial loading of .dwg files.
pAuditInfo[in] Pointer to an OdDbAuditInfo object.
password[in] Password for file.
allowCPConversion[in] If and only if true, allows code page conversion.
Remarks
Using this function in .tx code is not recommended. In .tx modules use OdDbHostAppServices::readFile() or OdDbHostAppServices::recoverFile() instead. This provides more control for host applications which can override these virtual methods.

The specified OdDbAuditInfo object controls the audit and receives the audit status.

If pAuditInfo is non-zero, a recover will be performed instead of a load.

Throws: OdError if the read is unsuccessful.

◆ redo()

void OdDbDatabase::redo ( )

Performs a redo operation on this database object.

Remarks
Restores operations undone by the last undo.

◆ release()

void OdDbDatabase::release ( )
virtual

Declares the method decrementing the reference counter in objects derived from this class.

Remarks
It is the pure virtual method that does not have an implementation. You must redefine it in the derived class.
See also
<link smart_pointers_overview.html, Overview of Smart Pointer Classes>

Implements OdRxObject.

◆ removeReactor()

void OdDbDatabase::removeReactor ( OdDbDatabaseReactor pReactor) const

Removes the specified reactor from this object's reactor list.

Parameters
pReactor[in] Pointer to the reactor object.

◆ removeTransactionReactor()

virtual void OdDbDatabase::removeTransactionReactor ( OdDbTransactionReactor reactor)
virtual

Removes the specified transaction reactor from this database object.

Parameters
reactor[in] Transaction reactor.

◆ renameLayout()

virtual void OdDbDatabase::renameLayout ( const OdString oldName,
const OdString newName 
)
virtual

Renames the specified layout in this database object.

Parameters
oldName[in] Old name.
newName[in] New name.

◆ resetTimes()

void OdDbDatabase::resetTimes ( )

Resets TDCREATE, TDUPDATE, TDINDWG and TDUSRTIMER system variables to the settings of the new drawing.

Remarks
TDCREATE and TDUPDATE will be set to the current system time and date. TDINDWG and TDUSRTIMER will be set to zero.

◆ restoreForwardingXrefSymbols()

void OdDbDatabase::restoreForwardingXrefSymbols ( )

Returns the database to its modified state (before any original state restoration) by redoing modifications.

Remarks
This function should be used with restoreOriginalXrefSymbols when reading or writing any xref object. The database requires write-access to symbol tables and records.

◆ restoreOriginalXrefSymbols()

void OdDbDatabase::restoreOriginalXrefSymbols ( )

Returns the database to its original state (when the xref was first read) by undoing any modifications.

Remarks
This function should be used with restoreForwardingXrefSymbols when reading or writing any xref object.

◆ retainOriginalThumbnailBitmap()

bool OdDbDatabase::retainOriginalThumbnailBitmap ( ) const

Returns the state of the RetainOriginalThumbnailBitmap flag.

◆ save() [1/2]

void OdDbDatabase::save ( const OdString filename,
bool  saveThumbnailImage = false 
)

Saves the database contents to the specified output .dwg file. Output file has the latest supported version format. Database contents are saved as a .dwg file of the latest supported version.

Parameters
filename[in] Target file absolute path.
saveThumbnailImage[in] Controls the saving of a thumbnail image to the file.

◆ save() [2/2]

void OdDbDatabase::save ( OdStreamBuf pStreamBuf,
bool  saveThumbnailImage = false 
)

Saves the database contents to the specified output stream buffer. Database contents are saved as a .dwg file of the latest supported version.

Parameters
pStreamBuf[in] Pointer to the StreamBuf object to which the data is to be written.
saveThumbnailImage[in] Controls the saving of a thumbnail image to the file.

◆ sectionViewStyle()

OdDbObjectId OdDbDatabase::sectionViewStyle ( ) const

Returns the object ID of the current SectionViewStyle of this database object.

◆ securityParams()

bool OdDbDatabase::securityParams ( OdSecurityParams secParams) const

Returns the security parameters of this database object.

Parameters
secParams[in] Security params.
Remarks
Returns true only if field nFlags of secParams is not equal to 0 and field password of secParams is not empty.

◆ setCannoscale()

void OdDbDatabase::setCannoscale ( OdDbAnnotationScale val)

Sets a new annotation scale as a context object for this database.

Parameters
val[in] A new value of annotation scale.
See also
OdDbAnnotationScale

◆ setCurrentLayout() [1/2]

virtual void OdDbDatabase::setCurrentLayout ( const OdDbObjectId layoutId)
virtual

Sets the current layout of this database object.

Parameters
layoutId[in] Object ID of layout to be set as current.

◆ setCurrentLayout() [2/2]

virtual void OdDbDatabase::setCurrentLayout ( const OdString layoutName)
virtual

Sets the current layout of this database object.

Parameters
layoutName[in] Name of the layout to be set as current.

◆ setCurrentUCS() [1/3]

void OdDbDatabase::setCurrentUCS ( const OdDbObjectId ucsId)

Sets the current UCS of this database object.

Parameters
ucsId[in] Object ID of the UCS.

◆ setCurrentUCS() [2/3]

void OdDbDatabase::setCurrentUCS ( const OdGePoint3d origin,
const OdGeVector3d xAxis,
const OdGeVector3d yAxis 
)

Sets the current UCS of this database object.

Parameters
origin[in] The WCS origin of the UCS.
xAxis[in] The WCS X-axis of the UCS.
yAxis[in] The WCS Y-axis of the UCS.

◆ setCurrentUCS() [3/3]

void OdDbDatabase::setCurrentUCS ( OdDb::OrthographicView  viewType)

Sets the current UCS of this database object.

Parameters
viewType[in] Orthographic view type.
Remarks
viewType must be one of the following:

Value View type OdDb::kNonOrthoView 0 Non-orthographic with respect to the UCS OdDb::kTopView 1 Top view with respect to the UCS OdDb::kBottomView 2 Bottom view with respect to the UCS OdDb::kFrontView 3 Front view with respect to the UCS OdDb::kBackView 4 Back view with respect to the UCS OdDb::kLeftView 5 Left view with respect to the UCS OdDb::kRightView 6 Right view with respect to the UCS

◆ setDetailViewStyle()

void OdDbDatabase::setDetailViewStyle ( OdDbObjectId  objectId)

Sets the object ID of the current DetailViewStyle of this database object.

Parameters
objectId[in] Object ID.

◆ setDimfit()

void OdDbDatabase::setDimfit ( int  val)

Sets the R14 DIMFIT system variable of this database object.

Parameters
val[in] New value for DIMFIT. [0..5]
Remarks
The DIMFIT value will be converted to DIMATFIT and DIMTMOVE values.

◆ setDimstyleData() [1/2]

void OdDbDatabase::setDimstyleData ( const OdDbDimStyleTableRecord pSource)

Copies the dimension style data from the specified DimStyleTableRecord to the dimension variables of this database object.

Parameters
pSource[in] Pointer to the source record.

◆ setDimstyleData() [2/2]

void OdDbDatabase::setDimstyleData ( OdDbObjectId  objectId)

Copies the dimension style data from the specified DimStyleTableRecord to the dimension variables of this database object.

Parameters
objectId[in] Object ID of the source record.

◆ setDimunit()

void OdDbDatabase::setDimunit ( int  val)

Sets the R14 DIMUNIT system variable of this database object.

Parameters
val[in] New value for DIMUNIT. [1..7]
Remarks
The DIMUNIT value will be converted to DIMLUNIT and DIMFRAC values.

◆ setMLeaderstyle()

void OdDbDatabase::setMLeaderstyle ( OdDbObjectId  objectId)

Sets the object ID of the current MLeaderStyle of this database object.

Parameters
objectId[in] Object ID.

◆ setMultiThreadedMode()

virtual void OdDbDatabase::setMultiThreadedMode ( OdDb::MultiThreadedMode  )
virtual

Sets a new multi-threaded mode for the database.

Parameters
[in]Anew value of multi-threaded mode to be set.
Remarks
New value can be one of the following:
Value Multi-threaded mode OdDb::MultiThreadedMode::kSTMode 0 No multi-threaded, uses single-threaded mode. OdDb::MultiThreadedMode::kMTRendering 1 Multi-threaded rendering. OdDb::MultiThreadedMode::kMTLoading 2 Multi-threaded data loading.

◆ setPUCSBASEORG()

void OdDbDatabase::setPUCSBASEORG ( OdDb::OrthographicView  viewType,
const OdGePoint3d origin 
)

Sets the UCS origin and orthographic view type for the current PaperSpace UCS.

Parameters
origin[in] The WCS origin of the UCS.
viewType[in] Orthographic view type.
Remarks
viewType must be one of the following:

Value View type OdDb::kNonOrthoView 0 Non-orthographic with respect to the UCS OdDb::kTopView 1 Top view with respect to the UCS OdDb::kBottomView 2 Bottom view with respect to the UCS OdDb::kFrontView 3 Front view with respect to the UCS OdDb::kBackView 4 Back view with respect to the UCS OdDb::kLeftView 5 Left view with respect to the UCS OdDb::kRightView 6 Right view with respect to the UCS

◆ setRetainOriginalThumbnailBitmap()

void OdDbDatabase::setRetainOriginalThumbnailBitmap ( bool  retain)

Controls the state of the RetainOriginalThumbnailBitmap flag.

Parameters
retain[in] Retain if and only if true.

◆ setSectionViewStyle()

void OdDbDatabase::setSectionViewStyle ( OdDbObjectId  objectId)

Sets the object ID of the current SectionViewStyle of this database object.

Parameters
objectId[in] Object ID.

◆ setSecurityParams()

void OdDbDatabase::setSecurityParams ( const OdSecurityParams secParams,
bool  setDbMod = true 
)

Sets the security parameters of this database object.

Parameters
secParams[in] Security params.
setDbMod[in] If and only if true, the DBMOD variable will be set if the security settings are modified.
Remarks
As implemented, this function ignores setDbMod and never modifies the DBMOD variable. It will be fully implemented in a future release.

◆ setSysVar()

void OdDbDatabase::setSysVar ( const OdString name,
const OdResBuf pValue 
)

Sets the specified system variable of this database object.

Parameters
name[in] Name of the system variable.
pValue[in] Pointer to an OdResBuf object that contains the new value.
Remarks
System variable names are case-insensitive strings.
See also
System Variables

◆ setTablestyle()

void OdDbDatabase::setTablestyle ( OdDbObjectId  objectId)

Sets the object ID of the current TableStyle of this database object.

Parameters
objectId[in] Object ID.

◆ setThumbnailBitmap()

void OdDbDatabase::setThumbnailBitmap ( const void pBMPData,
OdUInt32  dataLength 
)

Sets the thumbnail bitmap associated with this database object.

Remarks
The thumbnail is in Windows BITMAPINFO* format.
Parameters
dataLength[in] Data length of the thumbnail.
pBMPData[in] Pointer to the bitmap data.

◆ setUCSBASEORG()

void OdDbDatabase::setUCSBASEORG ( OdDb::OrthographicView  viewType,
const OdGePoint3d origin 
)

Sets the UCS origin and orthographic view type for the current UCS.

Parameters
origin[in] The WCS origin of the UCS.
viewType[in] Orthographic view type.
Remarks
viewType must be one of the following:

Value View type OdDb::kNonOrthoView 0 Non-orthographic with respect to the UCS OdDb::kTopView 1 Top view with respect to the UCS OdDb::kBottomView 2 Bottom view with respect to the UCS OdDb::kFrontView 3 Front view with respect to the UCS OdDb::kBackView 4 Back view with respect to the UCS OdDb::kLeftView 5 Left view with respect to the UCS OdDb::kRightView 6 Right view with respect to the UCS

◆ setUndoMark()

void OdDbDatabase::setUndoMark ( )

Sets an undo marker on this database object.

◆ startTransaction()

virtual void OdDbDatabase::startTransaction ( )
virtual

Starts a new transaction of this database object.

◆ startUndoRecord()

void OdDbDatabase::startUndoRecord ( )

Starts undo recording of this database object.

◆ subGetClassID()

OdResult OdDbDatabase::subGetClassID ( void pClsid) const
virtual

Returns the GUID of the database class.

Reimplemented from OdDbObject.

◆ subWblockClone()

OdDbObjectPtr OdDbDatabase::subWblockClone ( OdDbIdMapping ownerIdMap,
OdDbObject  
) const

As implemented, this function does nothing but return a null SmartPointer. It will be fully implemented in a future release.

◆ tablestyle()

OdDbObjectId OdDbDatabase::tablestyle ( ) const

Returns the object ID of the current TableStyle of this database object.

◆ thumbnailBitmap()

const void* OdDbDatabase::thumbnailBitmap ( OdUInt32 dataLength) const

Returns the thumbnail bitmap associated with this database object.

Remarks
The thumbnail is in Microsoft(R) Windows(R) BITMAPINFO* format.
Parameters
dataLength[out] Receives the data length of the thumbnail.

◆ undo()

void OdDbDatabase::undo ( )

Performs an undo operation on this database object.

Remarks
All operations performed since the last call to startUndoRecording will be undone. At least 1 undo step is always supported by Teigha for internal needs.

◆ undoBack()

void OdDbDatabase::undoBack ( )

Performs the undo operation on this database object.

◆ undoFiler()

OdDbDwgFiler* OdDbDatabase::undoFiler ( )

Returns the current object used for udo file input/output operations.

◆ updateExt()

void OdDbDatabase::updateExt ( bool  bExact = false)

Recalculates the extents of this database object.

Parameters
bExact[in] Enables a slower but more exact extents calculation algorithm.

◆ version()

OdDb::DwgVersion OdDbDatabase::version ( OdDb::MaintReleaseVer pMaintReleaseVer = 0) const

Returns the version of this database object.

Parameters
pMaintReleaseVer[in] Pointer to the MaintReleaseVer object to receive the maintenance release version.
Remarks
The maintenance release version is returned if and only if pMaintReleaseVer != 0.

◆ wblock() [1/3]

OdDbDatabasePtr OdDbDatabase::wblock ( )

Clones the entire contents of this database to a new database.

Remarks
The method creates a new OdDbDatabase object, populates it with objects from this database and returns a smart pointer to the new database. All objects are copied with their dependencies. For example, if a text entity uses a specific textstyle, it will be copied as well; line entities will be copied with their linestyles, etc.

◆ wblock() [2/3]

OdDbDatabasePtr OdDbDatabase::wblock ( const OdDbObjectIdArray outObjIds,
const OdGePoint3d basePoint 
)

Clones specified objects of this database to a new database.

Parameters
outObjIds[in] Array of object IDs to be cloned.
basePoint[in] WCS base point for the insertion.
Remarks
The method creates a new OdDbDatabase object, populates it with specified objects from this database using the wblockClone() method and returns a smart pointer to the new database. All objects are copied with their dependencies. For example, if a text entity uses a specific textstyle, it will be copied as well; line entities will be copied with their linestyles, etc.

◆ wblock() [3/3]

OdDbDatabasePtr OdDbDatabase::wblock ( OdDbObjectId  blockId)

Clones specified objects of this database to a new database.

Parameters
blockId[in] Object ID of the BlockTableRecord to be cloned.
Remarks
The method creates a new OdDbDatabase object, populates it with specified objects from this database using the wblockClone() method and returns a smart pointer to the new database. All objects are copied with their dependencies. For example, if a text entity uses a specific textstyle, it will be copied as well; line entities will be copied with their linestyles, etc.

◆ wblockCloneObjects()

void OdDbDatabase::wblockCloneObjects ( const OdDbObjectIdArray objectIds,
OdDbObjectId  ownerId,
OdDbIdMapping idMap,
OdDb::DuplicateRecordCloning  duplicateRecordCloning,
bool  deferXlation = false 
)

Shallow clones a set of objects and appends the clones to the specified owner object.

Parameters
objectIds[in] Array of object IDs of the objects to be cloned.
ownerId[in] Object ID of the owner object.
idMap[in/out] ID map.
deferXlation[in] Defer translation.
Remarks
idMap associates the object IDs of the original objects with the object IDs of the newly created clones.

When cloning objects with different owner IDs, a separate call to this function is required for each ownerId. In this case, all but the final call to this function should be made with deferXlation == true. This defers translation until all objects have been cloned.

A shallow clone is a clone of the specified objects but not what they own.

duplicateRecordCloning must be one of the following:

Value Description OdDb::kDrcNotApplicable 0 Not applicable to the object. OdDb::kDrcIgnore 1 If a duplicate record exists, use the existing record in the database and ignore the clone. OdDb::kDrcReplace 2 If a duplicate record exists, replace it with the cloned record. OdDb::kDrcXrefMangleName 3 Incoming record names are mangled with <Xref>$0$<name>. OdDb::kDrcMangleName 4 Incoming record names are mangled with $0$<name>. OdDb::kDrcUnmangleName 5 Unmangle the names mangled by OdDb::kDrcMangleName, then default to OdDb::kDrcIgnore. Typically used by RefEdit when checking records into the original database.

See also
deepCloneObjects()

◆ writeFile() [1/2]

void OdDbDatabase::writeFile ( const OdString filename,
OdDb::SaveType  fileType,
OdDb::DwgVersion  fileVersion,
bool  saveThumbnailImage = false,
int  dxfPrecision = 16 
)
inline

Writes the contents of this database object to the specified output file.

Parameters
filename[in] Name of the file to which the data is to be written.
fileType[in] File type.
fileVersion[in] File version.
saveThumbnailImage[in] Controls the saving of a thumbnail image to the file.
dxfPrecision[in] DXF file decimal digits precision. [0 .. 16].
Remarks
Parameter fileType must be one of the following:

Value Description OdDb::kDwg 0 .dwg file. OdDb::kDxf 1 .dxf file. OdDb::kDxb 2 Binary .dxf file.

fileVersion must be one of the following:

? Name Value Description n OdDb::vAC09 11 Release 9 n OdDb::vAC10 13 Release 10 y OdDb::vAC12 16 Release 11-12 y OdDb::vAC13 19 Release 13 y OdDb::vAC14 21 Release 14 y OdDb::vAC15 23 2000-2002 y OdDb::vAC18 25 2004-2006 y OdDb::vAC21 27 2007-2009 y OdDb::vAC24 29 2010-2012 y OdDb::vAC27 31 2013-2016

Throws: OdError if the write is unsuccessful.

Definition at line 896 of file DbDatabase.h.

◆ writeFile() [2/2]

void OdDbDatabase::writeFile ( OdStreamBuf pStreamBuf,
OdDb::SaveType  fileType,
OdDb::DwgVersion  fileVersion,
bool  saveThumbnailImage = false,
int  dxfPrecision = 16 
)

Writes the contents of this database object to the specified StreamBuf object.

Parameters
pStreamBuf[in] Pointer to the StreamBuf object to which the data is to be written.
fileType[in] File type.
fileVersion[in] File version.
saveThumbnailImage[in] Controls the saving of a thumbnail image to the file.
dxfPrecision[in] DXF file decimal digits precision. [0 .. 16].
Remarks
fileType must be one of the following:

Value Description OdDb::kDwg 0 .dwg file. OdDb::kDxf 1 .dxf file. OdDb::kDxb 2 Binary .dxf file.

Parameter fileVersion must be one of the following:

? Name Value Description n OdDb::vAC09 11 Release 9 n OdDb::vAC10 13 Release 10 y OdDb::vAC12 16 Release 11-12 y OdDb::vAC13 19 Release 13 y OdDb::vAC14 21 Release 14 y OdDb::vAC15 23 2000-2002 y OdDb::vAC18 25 2004-2006 y OdDb::vAC21 27 2007-2009 y OdDb::vAC24 29 2010-2012 y OdDb::vAC27 31 2013-2016

Throws: OdError if the write is unsuccessful.

◆ xrefBlockId()

OdDbObjectId OdDbDatabase::xrefBlockId ( ) const

Returns the object ID of the OdDbBlockTableRecord that references this database object as an Xref.

Friends And Related Function Documentation

◆ OdDbDatabaseImpl

friend class OdDbDatabaseImpl
friend

Definition at line 2315 of file DbDatabase.h.


The documentation for this class was generated from the following file: