CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbWipeoutVariables.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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-2022 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 OD_DBWIPEOUTVARIABLES_H
28#define OD_DBWIPEOUTVARIABLES_H
29
30#include "TD_PackPush.h"
31
32#include "DbObject.h"
33#include "RxDictionary.h"
34
35
36#ifdef WIPEOUT_EXPORTS
37#define WIPEOUT_EXPORT OD_TOOLKIT_EXPORT
38#define WIPEOUT_EXPORT_STATIC OD_STATIC_EXPORT
39#else
40#define WIPEOUT_EXPORT OD_TOOLKIT_IMPORT
41#define WIPEOUT_EXPORT_STATIC OD_STATIC_IMPORT
42#endif
43
44
45
51
60{
61public:
63
65
67
68 virtual void dwgOutFields(OdDbDwgFiler* pFiler) const;
69
71
72 virtual void dxfOutFields(OdDbDxfFiler* pFiler) const;
73
77 virtual bool showFrame() const;
78
88 virtual void setShowFrame(bool showFrame, bool bUpdateWIPEOUTFRAME = true);
89
101 static OdDbWipeoutVariablesPtr openWipeoutVariables(OdDbDatabase* pDb,
102 OdDb::OpenMode openMode = OdDb::kForRead);
103};
104
105
108 ODA_ASSERT(pDatabase);
109 if (pDatabase) {
111 OdString AcDbWipeoutVariables(L"AcDbWipeoutVariables");
112 pWpVars = ::odrxCastByClassName<OdDbWipeoutVariables>(pRootDict->getAt(ACAD_WIPEOUT_VARS).openObject(mode), AcDbWipeoutVariables);
113 if (pWpVars.isNull() && mode == OdDb::kForWrite) {
114 pRootDict->upgradeOpen();
115 pWpVars = ::odrxSafeCreateObject<OdDbWipeoutVariables>(AcDbWipeoutVariables);
116 pRootDict->setAt(ACAD_WIPEOUT_VARS, pWpVars);
117 }
118 }
119 return pWpVars;
120}
121
122
123#include "TD_PackPop.h"
124
125#endif //OD_DBWIPEOUTVARIABLES_H
126
#define WIPEOUT_EXPORT
OdSmartPtr< OdDbWipeoutVariables > OdDbWipeoutVariablesPtr
#define ODA_ASSERT(exp)
Definition: DebugStuff.h:57
OdResult
Definition: OdResult.h:29
bool isNull() const
Definition: BaseObjectPtr.h:86
OdDbObjectId getNamedObjectsDictionaryId() const
OdResult openObject(OdDbObjectPtr &pObj, OdDb::OpenMode openMode=OdDb::kForRead, bool openErasedOne=false) const
virtual bool showFrame() const
virtual void setShowFrame(bool showFrame, bool bUpdateWIPEOUTFRAME=true)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
ODDB_DECLARE_MEMBERS(OdDbWipeoutVariables)
static OdDbWipeoutVariablesPtr openWipeoutVariables(OdDbDatabase *pDb, OdDb::OpenMode openMode=OdDb::kForRead)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OpenMode
Definition: DbObjectId.h:54
@ kForRead
Definition: DbObjectId.h:56
@ kForWrite
Definition: DbObjectId.h:57