FRX SDK Documentation 2025 SP0
Loading...
Searching...
No Matches
AcadEntityImpl.h
Go to the documentation of this file.
1#pragma once
2
3//
4// (C) Copyright 2005-2024 by Graebert GmbH.
5//
6// Permission to use, copy, modify, and distribute this software in
7// object code form for any purpose and without fee is hereby granted,
8// provided that the above copyright notice appears in all copies and
9// that both that copyright notice and the limited warranty and
10// restricted rights notice below appear in all supporting
11// documentation.
12//
13// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
14// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
15// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
16// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
17// UNINTERRUPTED OR ERROR FREE.
18
19template <class C , const CLSID* pclsid , class T , const IID* piid , const GUID* plibid ,
20 WORD wMajor = 1 , WORD wMinor = 0 , class tihclass = CComTypeInfoHolder>
21 class ATL_NO_VTABLE IAcadEntityDispatchImpl
22 : public IAcadObjectDispatchImpl<C , pclsid , T , piid , plibid , wMajor , wMinor , tihclass>
23{
24public:
25 STDMETHODIMP get_TrueColor( IAcadAcCmColor** pColor )
26 {
27 return ::AcAxGetTrueColor( this->m_objId , pColor );
28 }
29 STDMETHODIMP put_TrueColor( IAcadAcCmColor* pColor )
30 {
31 return ::AcAxPutTrueColor( this->m_objId , pColor );
32 }
33
34 STDMETHODIMP get_Layer( BSTR * pVal )
35 {
36 return ::AcAxGetLayer( this->m_objId , pVal );
37 }
38
39 STDMETHODIMP put_Layer( BSTR newVal )
40 {
41 return ::AcAxPutLayer( this->m_objId , newVal );
42 }
43
44 STDMETHODIMP get_Linetype( BSTR * pVal )
45 {
46 return ::AcAxGetLinetype( this->m_objId , pVal );
47 }
48
49 STDMETHODIMP put_Linetype( BSTR newVal )
50 {
51 return ::AcAxPutLinetype( this->m_objId , newVal );
52 }
53
54 STDMETHODIMP get_LinetypeScale( double * pVal )
55 {
56 return ::AcAxGetLinetypeScale( this->m_objId , pVal );
57 }
58
59 STDMETHODIMP put_LinetypeScale( double newVal )
60 {
61 return ::AcAxPutLinetypeScale( this->m_objId , newVal );
62 }
63
64 STDMETHODIMP get_Visible( VARIANT_BOOL * pVal )
65 {
66 return ::AcAxGetVisible( this->m_objId , pVal );
67 }
68
69 STDMETHODIMP put_Visible( VARIANT_BOOL newVal )
70 {
71 return ::AcAxPutVisible( this->m_objId , newVal );
72 }
73
74 STDMETHODIMP ArrayPolar( int numObjs , double fillAngle , VARIANT basePoint , VARIANT * pArrayObjs )
75 {
76 return ::AcAxArrayPolar( this->m_objId , this->m_App , numObjs , fillAngle , basePoint , pArrayObjs );
77 }
78
79 STDMETHODIMP ArrayRectangular( int numRows , int numCols , int numLvls , double disRows , double disCols , double disLvls , VARIANT * pArrayObjs )
80 {
81 return ::AcAxArrayRectangular( this->m_objId , this->m_App , numRows , numCols , numLvls , disRows , disCols , disLvls , pArrayObjs );
82 }
83
84 STDMETHODIMP Highlight( VARIANT_BOOL bFlag )
85 {
86 return ::AcAxHighlight( this->m_objId , bFlag );
87 }
88
89 STDMETHODIMP Copy( LPDISPATCH * pCopyObj )
90 {
91 return ::AcAxCopy( this->m_objId , this->m_App , pCopyObj );
92 }
93
94 STDMETHODIMP Move( VARIANT fromPoint , VARIANT toPoint )
95 {
96 return ::AcAxMove( this->m_objId , fromPoint , toPoint );
97 }
98
99 STDMETHODIMP Rotate( VARIANT basePoint , double rotationAngle )
100 {
101 return ::AcAxRotate( this->m_objId , basePoint , rotationAngle );
102 }
103
104 STDMETHODIMP Rotate3D( VARIANT point1 , VARIANT point2 , double rotationAngle )
105 {
106 return ::AcAxRotate3D( this->m_objId , point1 , point2 , rotationAngle );
107 }
108
109 STDMETHODIMP Mirror( VARIANT point1 , VARIANT point2 , LPDISPATCH * pMirrorObj )
110 {
111 return ::AcAxMirror( this->m_objId , this->m_App , point1 , point2 , pMirrorObj );
112 }
113
114 STDMETHODIMP Mirror3D( VARIANT point1 , VARIANT point2 , VARIANT point3 , LPDISPATCH * pMirrorObj )
115 {
116 return ::AcAxMirror3D( this->m_objId , this->m_App , point1 , point2 , point3 , pMirrorObj );
117 }
118
119 STDMETHODIMP ScaleEntity( VARIANT basePoint , double scaleFactor )
120 {
121 return ::AcAxScaleEntity( this->m_objId , basePoint , scaleFactor );
122 }
123
124 STDMETHODIMP TransformBy( VARIANT transMatrix )
125 {
126 return ::AcAxTransformBy( this->m_objId , transMatrix );
127 }
128
129 STDMETHODIMP Update( )
130 {
131 return ::AcAxUpdate( this->m_objId );
132 }
133
134 STDMETHODIMP GetBoundingBox( VARIANT * minPoint , VARIANT * maxPoint )
135 {
136 return ::AcAxGetBoundingBox( this->m_objId , minPoint , maxPoint );
137 }
138
139 STDMETHODIMP IntersectWith( LPDISPATCH pEntity , AcExtendOption option , VARIANT * intPoints )
140 {
141 return ::AcAxIntersectWith( this->m_objId , pEntity , option , intPoints );
142 }
143
144 STDMETHODIMP get_PlotStyleName( BSTR* plotStyleName )
145 {
146 return ::AcAxGetPlotStyleName( this->m_objId , plotStyleName );
147 }
148
149 STDMETHODIMP put_PlotStyleName( BSTR plotStyleName )
150 {
151 return ::AcAxPutPlotStyleName( this->m_objId , plotStyleName );
152 }
153
154 STDMETHODIMP get_Lineweight( ACAD_LWEIGHT* lineweight )
155 {
156 return ::AcAxGetLineWeight( this->m_objId , lineweight );
157 }
158
159 STDMETHODIMP put_Lineweight( ACAD_LWEIGHT lineweight )
160 {
161 return ::AcAxPutLineWeight( this->m_objId , lineweight );
162 }
163
164 STDMETHODIMP get_Hyperlinks( IAcadHyperlinks** pHyperlinks )
165 {
166 return ::AcAxGetHyperlinks( this->m_objId , this->m_App , pHyperlinks );
167 }
168
169 STDMETHODIMP get_color( AcColor* pVal )
170 {
171 return ::AcAxGetColor( this->m_objId , pVal );
172 }
173
174 STDMETHODIMP put_color( AcColor newVal )
175 {
176 return ::AcAxPutColor( this->m_objId , newVal );
177 }
178
179 //
180 // Provided for backwards compatibility; for future coding
181 // use call ObjectName() instead of EntityName()
182 //
183 STDMETHOD( get_EntityName )( BSTR *pVal )
184 {
185 return ::AcAxGetObjectName( this->m_objId , pVal );
186 }
187
188 //
189 // Provided for backwards compatibility; for future coding
190 // use QueryInterface() to determine object type. In VB,
191 // the TypeOf function can be used.
192 //
193 STDMETHOD( get_EntityType )( long* entType )
194 {
195 return E_NOTIMPL;
196 // return AcAxGetObjectType( this->m_objId , entType );
197 }
198
199 STDMETHODIMP get_Material( BSTR* Material )
200 {
201 return AcAxGetMaterial( this->m_objId , Material );
202 }
203
204 STDMETHODIMP put_Material( BSTR Material )
205 {
206 return AcAxPutMaterial( this->m_objId , Material );
207 }
208 STDMETHODIMP get_EntityTransparency( BSTR* transparency )
209 {
210 return AcAxGetTransparency( this->m_objRef , transparency );
211 }
212
213 STDMETHODIMP put_EntityTransparency( BSTR transparency )
214 {
215 return AcAxPutTransparency( this->m_objRef , transparency );
216 }
217 STDMETHODIMP InterfaceSupportsErrorInfo( REFIID riid )
218 {
219 static const IID* arr [ ] =
220 {
221 piid,
224 };
225 for ( int i = 0; i < sizeof( arr ) / sizeof( arr [ 0 ] ); i++ )
226 {
227 if ( InlineIsEqualGUID( *arr [ i ] , riid ) )
228 return S_OK;
229 }
230 return S_FALSE;
231 }
232};
interface IAcadHyperlinks IAcadHyperlinks
Definition OdaX.h:95
EXTERN_C const IID IID_IAcadEntity
Definition OdaX.h:7260
EXTERN_C const IID IID_IAcadObject
Definition OdaX.h:4014
AcExtendOption
Definition OdaX.h:2729
interface IAcadAcCmColor IAcadAcCmColor
Definition OdaX.h:88
AcColor
Definition OdaX.h:2563
ARX_API long __cdecl AcAxGetMaterial(AcAxObjectRef &, BSTR *)
ARX_API long AcAxPutTransparency(AcAxObjectRef &, BSTR)
ARX_API long AcAxGetTransparency(AcAxObjectRef &, BSTR *)
ARX_API long __cdecl AcAxPutMaterial(AcAxObjectRef &, BSTR)
STDMETHODIMP put_EntityTransparency(BSTR transparency)
STDMETHODIMP get_color(AcColor *pVal)
STDMETHODIMP get_LinetypeScale(double *pVal)
STDMETHODIMP get_PlotStyleName(BSTR *plotStyleName)
STDMETHODIMP GetBoundingBox(VARIANT *minPoint, VARIANT *maxPoint)
STDMETHODIMP get_Layer(BSTR *pVal)
STDMETHODIMP Mirror3D(VARIANT point1, VARIANT point2, VARIANT point3, LPDISPATCH *pMirrorObj)
STDMETHODIMP get_EntityTransparency(BSTR *transparency)
STDMETHODIMP TransformBy(VARIANT transMatrix)
STDMETHODIMP Highlight(VARIANT_BOOL bFlag)
STDMETHODIMP get_Linetype(BSTR *pVal)
STDMETHODIMP put_Lineweight(ACAD_LWEIGHT lineweight)
STDMETHODIMP Mirror(VARIANT point1, VARIANT point2, LPDISPATCH *pMirrorObj)
STDMETHODIMP get_Hyperlinks(IAcadHyperlinks **pHyperlinks)
STDMETHODIMP get_Lineweight(ACAD_LWEIGHT *lineweight)
STDMETHODIMP put_TrueColor(IAcadAcCmColor *pColor)
STDMETHODIMP Copy(LPDISPATCH *pCopyObj)
STDMETHODIMP Rotate(VARIANT basePoint, double rotationAngle)
STDMETHODIMP put_Layer(BSTR newVal)
STDMETHODIMP IntersectWith(LPDISPATCH pEntity, AcExtendOption option, VARIANT *intPoints)
STDMETHODIMP InterfaceSupportsErrorInfo(REFIID riid)
STDMETHODIMP ArrayPolar(int numObjs, double fillAngle, VARIANT basePoint, VARIANT *pArrayObjs)
STDMETHODIMP ScaleEntity(VARIANT basePoint, double scaleFactor)
STDMETHODIMP Rotate3D(VARIANT point1, VARIANT point2, double rotationAngle)
STDMETHODIMP put_LinetypeScale(double newVal)
STDMETHODIMP put_Material(BSTR Material)
STDMETHODIMP Move(VARIANT fromPoint, VARIANT toPoint)
STDMETHODIMP put_Linetype(BSTR newVal)
STDMETHODIMP get_TrueColor(IAcadAcCmColor **pColor)
STDMETHODIMP get_Material(BSTR *Material)
STDMETHODIMP get_Visible(VARIANT_BOOL *pVal)
STDMETHODIMP put_PlotStyleName(BSTR plotStyleName)
STDMETHODIMP put_Visible(VARIANT_BOOL newVal)
STDMETHODIMP put_color(AcColor newVal)
STDMETHODIMP ArrayRectangular(int numRows, int numCols, int numLvls, double disRows, double disCols, double disLvls, VARIANT *pArrayObjs)