CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
odaxwrap.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 _ODAXWRAP_H_INCLUDED_
28#define _ODAXWRAP_H_INCLUDED_
29
30#if defined(_MSC_VER) && (_MSC_VER > 1310) && defined(_TOOLKIT_IN_DLL_) && !defined(_WIN32_WCE) && !defined(_WINRT)
31#include "TD_PackPush.h"
32
33#define _INC_MALLOC
34#include <comdef.h>
35
36#include "oaidl.h"
37#include "OdaX.h"
38class OdDbObjectId;
39class OdGePoint3d;
40class OdGeVector3d;
41class OdGePoint2d;
42class OdGeVector2d;
44
45interface __declspec(uuid("C9E0781D-BA3D-4224-9FA4-58ECEA2BC559"))
46IAcadBaseObject : public IUnknown
47{
48 // IAcadBaseObject methods
49 virtual HRESULT STDMETHODCALLTYPE SetObjectId(OdDbObjectId& objId,
50 OdDbObjectId ownerId = OdDbObjectId::kNull, TCHAR* keyName = 0) = 0;
51 virtual HRESULT STDMETHODCALLTYPE GetObjectId(OdDbObjectId* objId) = 0;
52 virtual HRESULT STDMETHODCALLTYPE Clone(OdDbObjectId ownerId, LPUNKNOWN* pUnkClone) = 0;
53 virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID& clsid) = 0;
54 virtual HRESULT STDMETHODCALLTYPE NullObjectId() = 0;
55 virtual HRESULT STDMETHODCALLTYPE OnModified() = 0;
56};
57
58typedef IAcadBaseObject* LPACADBASEOBJECT;
59
60
61// Definition of interface: IRetrieveApplication
62interface __declspec(uuid("0E25DE83-2257-4b6d-B73B-33F1D21FFD8D"))
63IRetrieveHostAppServices : IUnknown
64{
65 virtual HRESULT STDMETHODCALLTYPE GetHostAppServices(OdDbHostAppServices** ppHostAppServices) = 0;
66};
67
68_COM_SMARTPTR_TYPEDEF(IRetrieveHostAppServices, __uuidof(IRetrieveHostAppServices));
69
70// Definition of interface: IRetrieveApplication
71interface __declspec(uuid("765B4640-664A-11cf-93F3-0800099EB3B7"))
72IRetrieveApplication : public IUnknown
73{
74 // IRetrieveApplication methods
75 virtual HRESULT STDMETHODCALLTYPE SetApplicationObject(LPDISPATCH pAppDisp) = 0;
76 virtual HRESULT STDMETHODCALLTYPE GetApplicationObject(LPDISPATCH* pAppDisp) = 0;
77};
78
79typedef IRetrieveApplication* LPRETRIEVEAPPLICATION;
80
81// Definition of interface: IAcadBaseDatabase
82interface __declspec(uuid("CD3EB5B8-F3FC-48c2-84EE-954EFC4D4208"))
83IAcadBaseDatabase : public IUnknown
84{
85 // IAcadBaseObject methods
86 virtual HRESULT STDMETHODCALLTYPE SetDatabase(OdDbDatabase*& pDb) = 0;
87 virtual HRESULT STDMETHODCALLTYPE GetDatabase(OdDbDatabase** pDb) = 0;
88 virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID& clsid) = 0;
89};
90
91typedef IAcadBaseDatabase* LPACADBASEDATABASE;
92
93
94_COM_SMARTPTR_TYPEDEF(IAcadBaseObject, __uuidof(IAcadBaseObject));
95_COM_SMARTPTR_TYPEDEF(IRetrieveApplication, __uuidof(IRetrieveApplication));
96_COM_SMARTPTR_TYPEDEF(IAcadBaseDatabase, __uuidof(IAcadBaseDatabase));
97
98
99// {4D07FC10-F931-11ce-B001-00AA006884E5}
100DEFINE_GUID(IID_ICategorizeProperties, 0x4d07fc10, 0xf931, 0x11ce, 0xb0, 0x1, 0x0, 0xaa, 0x0, 0x68, 0x84, 0xe5);
101
103
104
105typedef int PROPCAT;
106
107#ifndef __OBJEXT_H
108interface __declspec(uuid("4D07FC10-F931-11ce-B001-00AA006884E5"))
109ICategorizeProperties : public IUnknown
110{
111 // Return a property category for the specified property.
112 virtual HRESULT STDMETHODCALLTYPE MapPropertyToCategory(
113 /*[in]*/ DISPID dispid, /*[out]*/ PROPCAT* ppropcat) = 0;
114
115 // Return the name associated with the specified category ID, as a BSTR.
116 virtual HRESULT STDMETHODCALLTYPE GetCategoryName(
117 /*[in]*/ PROPCAT propcat, /*[in]*/ LCID lcid, /*[out]*/BSTR* pbstrName) = 0;
118};
119
120typedef ICategorizeProperties FAR* LPCATEGORIZEPROPERTIES;
121#endif
122
123//
124// Utility functions
125//
126DBENT_EXPORT IUnknown* OdOxGetIUnknownOfObject(OdDbObjectId objId, LPDISPATCH pApp);
127//DBENT_EXPORT IUnknown* OdOxGetIUnknownOfObject(OdDbObject* pObj, LPDISPATCH pApp);
128DBENT_EXPORT IUnknown* OdOxGetIUnknownOfDatabase(OdDbDatabase* pDb, LPDISPATCH pApp);
129
130
131#define FACILITY_ODA 32
132
133#define OdHresultFromOdResult(res) MAKE_HRESULT(res!=eOk ? 3 : 0, FACILITY_ODA, res)
134
135#include "TD_PackPop.h"
136#endif //_WIN32
137
138#if defined(_MSC_VER) && defined(_TOOLKIT_IN_DLL_) && (_MSC_VER > 1310) && !defined(_WIN32_WCE) && !defined(_WINRT)
139#define _DEFINE_GET_CLASS_ID(Class, ID) \
140OdResult Class::subGetClassID(void* pClsid) const { *(CLSID*)pClsid = ID; return eOk;}
141#else
142#define _DEFINE_GET_CLASS_ID(Class, CLSID) \
143OdResult Class::subGetClassID(void* pClsid) const { return eNotImplemented; }
144#endif // _TOOLKIT_IN_DLL_
145
146#endif // _ODAXWRAP_H_INCLUDED_
147
unsigned long LCID
#define DBENT_EXPORT
Definition: DbExport.h:67
#define CLSID
Definition: OdPlatform.h:1090
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
Definition: DbObjectId.h:110