CFx SDK Documentation  2023 SP0
AECSubObj.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 #ifndef __AECSUBOBJ_H__
25 #define __AECSUBOBJ_H__
26 
27 #include "AECBase.h"
28 
29 class AECImpObj;
30 
36 class AECBASE_API AECSubObj : public OdRxObject
37 {
39 
40  public:
44  virtual ~AECSubObj();
45 
49  OdRxObject* GetOwner() const;
50 
54  OdRxObject* GetOwner( OdRxClass* pClass ) const;
55 
59  void addRefSubPtr();
60 
64  void releaseSubPtr();
65 
69  void assertReadEnabled() const;
70 
74  void assertWriteEnabled( bool autoUndo = true,
75  bool recordModified = true );
76 
80  bool isReadEnabled() const;
81 
85  bool isWriteEnabled() const;
86 
91 
92  public:
94  // For internal use.
95  void SetOwner( const OdDbObject* pOwner );
96 
98  // For internal use.
99  void SetOwner( const AECSubObj* pOwner );
100 
102  // For internal use.
103  void SetOwner( const AECImpObj* pOwner );
104 
105  protected:
106  class AECImpOwnerKeeper* m_pImp;
107 
108  private:
110  // disable copying
111  AECSubObj( const AECSubObj& );
112 
114  // disable copying
115  AECSubObj& operator = ( const AECSubObj& );
116 };
117 
118 #include "Common/AECSubPtr.h"
119 
120 #endif //__AECSUBOBJ_H__
#define AEC_SUBOBJ_DECLARE_MEMBERS_NO_DESTR(ClassName)
Definition: AECMacros.h:100
bool isReadEnabled() const
void assertReadEnabled() const
OdDbDatabase * database() const
void SetOwner(const OdDbObject *pOwner)
DOM.
void assertWriteEnabled(bool autoUndo=true, bool recordModified=true)
OdRxObject * GetOwner() const
void releaseSubPtr()
void addRefSubPtr()
bool isWriteEnabled() const
void SetOwner(const AECSubObj *pOwner)
DOM.
class AECImpOwnerKeeper * m_pImp
Definition: AECSubObj.h:106
OdRxObject * GetOwner(OdRxClass *pClass) const
void SetOwner(const AECImpObj *pOwner)
DOM.
virtual ~AECSubObj()