Repository navigation
Expand file tree
/
Copy pathModuleMain.cpp
More file actions
252 lines (241 loc) · 11.7 KB
/
Copy pathModuleMain.cpp
File metadata and controls
252 lines (241 loc) · 11.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
//
// ModuleMain.cpp
//
// Main entry point for Vectorworks module code.
//
#include "Prefix/StdAfx.h"
#include "Include/VectorworksMVR.h"
#include "Include/IMediaRessourceVectorInterface.h"
#include "Implementation/CMediaRessourceVectorImpl.h"
#include "Implementation/CConnectionImpl.h"
#include "Implementation/CCustomCommandImpl.h"
#include "Implementation/CAlignmentImpl.h"
#include "Implementation/COverwriteImpl.h"
// GDTF stuff
#include "Implementation/CGdtfFixture.h"
#include "Implementation/CGdtfWheel.h"
#include "Implementation/CGdtfActivationGroup.h"
#include "Implementation/CGdtfFeatureGroup.h"
#include "Implementation/CGdtfAttribute.h"
#include "Implementation/CGdtfModel.h"
#include "Implementation/CGdtfGeometry.h"
#include "Implementation/CGdtfDmxMode.h"
#include "Implementation/CGdtfRevision.h"
#include "Implementation/CGdtfUserPreset.h"
#include "Implementation/CGdtfMacro.h"
#include "Implementation/CGdtfMacroDMX.h"
#include "Implementation/CGdtfMacroDMXStep.h"
#include "Implementation/CGdtfMacroDMXValue.h"
#include "Implementation/CGdtfMacroVisual.h"
#include "Implementation/CGdtfMacroVisualStep.h"
#include "Implementation/CGdtfMacroVisualValue.h"
#include "Implementation/CGdtfFeature.h"
#include "Implementation/CGdtfWheelSlot.h"
#include "Implementation/CGdtfDmxChannel.h"
#include "Implementation/CGdtfDmxRelation.h"
#include "Implementation/CGdtfPhysicalEmitter.h"
#include "Implementation/CGdtfMeasurementPoint.h"
#include "Implementation/CGdtfDmxLogicalChannel.h"
#include "Implementation/CGdtfDmxChannelFunction.h"
#include "Implementation/CGdtfDmxChannelSet.h"
#include "Implementation/CGdtfDmxSubChannelSet.h"
#include "Implementation/CGdtfBreak.h"
#include "Implementation/CGdtfWheelSlotPrismFacet.h"
#include "Implementation/CGdtfWheelSlotAnimationSystem.h"
#include "Implementation/CGeometryReferenceImpl.h"
#include "Implementation/CGdtfXmlParsingError.h"
#include "Implementation/CGdtfDMXPersonality.h"
#include "Implementation/CGdtfSoftwareVersionID.h"
#include "Implementation/CGdtfFTRDM.h"
#include "Implementation/CGdtfMap.h"
#include "Implementation/CGdtfArtNet.h"
#include "Implementation/CGdtfSACN.h"
#include "Implementation/CGdtfMeasurement.h"
#include "Implementation/CGdtfFilter.h"
#include "Implementation/CGdtfDmxProfile.h"
#include "Implementation/CGdtfPoint.h"
#include "Implementation/CGdtfColorSpace.h"
#include "Implementation/CGdtfConnector.h"
#include "Implementation/CUtility.h"
#include "Implementation/CGdtfLaserProtocol.h"
#include "Implementation/CGdtfPinPatch.h"
#include "Implementation/CGdtfSubPhysicalUnit.h"
#include "Implementation/CGdtfGamut.h"
#ifdef BUILD_MVR_XCHANGE
// not in Implementation folder, so it can be switched off easily
#include "mvrxchange/CMVRxchangeService.h"
#endif
// XML
#include "XMLLib/XMLFileNodeImpl.h"
#include "XMLLib/XMLFileImpl.h"
#ifdef DONT_USE_XERCES_AS_XMLLIB
#include "rapidxmlsupport/mvr_xml_impl.h"
#endif
// Wrapper
#include "Wrapper/FileIdentifier.h"
#include "Wrapper/FilingWrapper.h"
#include "Wrapper/FolderIdentifier.h"
#include "Wrapper/PluginResource.h"
#include "Wrapper/RawOSFileimpl.h"
#include "Wrapper/TDQuickDraw.h"
#include "Wrapper/UTranslateFiles.h"
#include "Wrapper/ZIPFileImpl.h"
//------------------------------------------------------------------
extern "C" VectorworksMVR::VCOMError VWQueryInterface(const VectorworksMVR::VWIID& iid, VectorworksMVR::IVWUnknown** outInterface)
{
VectorworksMVR::IVWUnknown* resultInterface = nullptr;
// match interface iid
if (iid == VectorworksMVR::IID_MediaRessourceVectorInterface)
resultInterface = new VectorworksMVR::CMediaRessourceVectorImpl();
else if (iid == VectorworksMVR::IID_SceneDataProvider)
resultInterface = new VectorworksMVR::CSceneDataProviderImpl();
else if (iid == VectorworksMVR::IID_SceneObject)
resultInterface = new VectorworksMVR::CSceneObjImpl();
else if (iid == VectorworksMVR::IID_SourceObj)
resultInterface = new VectorworksMVR::CSourceImpl();
else if (iid == VectorworksMVR::IID_ISymDef)
resultInterface = new VectorworksMVR::CSymDefImpl();
else if (iid == VectorworksMVR::IID_IClass)
resultInterface = new VectorworksMVR::CClassImpl();
else if (iid == VectorworksMVR::IID_PositionObj)
resultInterface = new VectorworksMVR::CPositionImpl();
else if (iid == VectorworksMVR::IID_MappingDefinitionObj)
resultInterface = new VectorworksMVR::CMappingDefinitionImpl();
else if (iid == VectorworksMVR::IID_MappingObj)
resultInterface = new VectorworksMVR::CMappingImpl();
else if (iid == VectorworksMVR::IID_ConnectionObj)
resultInterface = new VectorworksMVR::CConnectionImpl();
else if (iid == VectorworksMVR::IID_CustomCommand)
resultInterface = new VectorworksMVR::CCustomCommandImpl();
else if (iid == VectorworksMVR::IID_Alignment)
resultInterface = new VectorworksMVR::CAlignmentImpl();
else if (iid == VectorworksMVR::IID_Overwrite)
resultInterface = new VectorworksMVR::COverwriteImpl();
else if (iid == VectorworksMVR::IID_GeometryReference)
resultInterface = new VectorworksMVR::CGeometryReferenceImpl();
else if (iid == VectorworksMVR::IID_IGdtfFixture)
resultInterface = new VectorworksMVR::CGdtfFixtureImpl();
else if (iid == VectorworksMVR::IID_GdtfWheel)
resultInterface = new VectorworksMVR::CGdtfWheelImpl();
else if (iid == VectorworksMVR::IID_GdtfActivationGroup)
resultInterface = new VectorworksMVR::CGdtfActivationGroupImpl();
else if (iid == VectorworksMVR::IID_GdtfFeatureGroup)
resultInterface = new VectorworksMVR::CGdtfFeatureGroupImpl();
else if (iid == VectorworksMVR::IID_GdtfAttribute)
resultInterface = new VectorworksMVR::CGdtfAttributeImpl();
else if (iid == VectorworksMVR::IID_GdtfModel)
resultInterface = new VectorworksMVR::CGdtfModelImpl();
else if (iid == VectorworksMVR::IID_GdtfGeometry)
resultInterface = new VectorworksMVR::CGdtfGeometryImpl();
else if (iid == VectorworksMVR::IID_GdtfDmxMode)
resultInterface = new VectorworksMVR::CGdtfDmxModeImpl();
else if (iid == VectorworksMVR::IID_GdtfRevision)
resultInterface = new VectorworksMVR::CGdtfRevisionImpl();
else if (iid == VectorworksMVR::IID_GdtfUserPreset)
resultInterface = new VectorworksMVR::CGdtfUserPresetImpl();
else if (iid == VectorworksMVR::IID_GdtfMacro)
resultInterface = new VectorworksMVR::CGdtfMacroImpl();
else if (iid == VectorworksMVR::IID_GdtfMacroDMX)
resultInterface = new VectorworksMVR::CGdtfMacroDMXImpl();
else if (iid == VectorworksMVR::IID_GdtfMacroDMXStep)
resultInterface = new VectorworksMVR::CGdtfMacroDMXStepImpl();
else if (iid == VectorworksMVR::IID_GdtfMacroDMXValue)
resultInterface = new VectorworksMVR::CGdtfMacroDMXValueImpl();
else if (iid == VectorworksMVR::IID_GdtfMacroVisual)
resultInterface = new VectorworksMVR::CGdtfMacroVisualImpl();
else if (iid == VectorworksMVR::IID_GdtfMacroVisualStep)
resultInterface = new VectorworksMVR::CGdtfMacroVisualStepImpl();
else if (iid == VectorworksMVR::IID_GdtfMacroVisualValue)
resultInterface = new VectorworksMVR::CGdtfMacroVisualValueImpl();
else if (iid == VectorworksMVR::IID_GdtfFeature)
resultInterface = new VectorworksMVR::CGdtfFeatureImpl();
else if (iid == VectorworksMVR::IID_GdtfWheelSlot)
resultInterface = new VectorworksMVR::CGdtfWheelSlotImpl();
else if (iid == VectorworksMVR::IID_GdtfDmxChannel)
resultInterface = new VectorworksMVR::CGdtfDmxChannelImpl();
else if (iid == VectorworksMVR::IID_GdtfDmxRelation)
resultInterface = new VectorworksMVR::CGdtfDmxRelationImpl();
else if (iid == VectorworksMVR::IID_GdtfPhysicalEmitter)
resultInterface = new VectorworksMVR::CGdtfPhysicalEmitterImpl();
else if (iid == VectorworksMVR::IID_GdtfMeasurementPoint)
resultInterface = new VectorworksMVR::CGdtfMeasurementPointImpl();
else if (iid == VectorworksMVR::IID_GdtfDmxLogicalChannel)
resultInterface = new VectorworksMVR::CGdtfDmxLogicalChannelImpl();
else if (iid == VectorworksMVR::IID_GdtfDmxChannelFunction)
resultInterface = new VectorworksMVR::CGdtfDmxChannelFunctionImpl();
else if (iid == VectorworksMVR::IID_GdtfDmxChannelSet)
resultInterface = new VectorworksMVR::CGdtfDmxChannelSetImpl();
else if (iid == VectorworksMVR::IID_GdtfDmxSubChannelSet)
resultInterface = new VectorworksMVR::CGdtfDmxSubChannelSetImpl();
else if (iid == VectorworksMVR::IID_GdtfBreak)
resultInterface = new VectorworksMVR::CGdtfBreakImpl();
else if (iid == VectorworksMVR::IID_GdtfWheelSlotPrismFacet)
resultInterface = new CGdtfWheelSlotPrismFacetImpl();
else if (iid == VectorworksMVR::IID_GdtfWheelSlotAnimationSystem)
resultInterface = new CGdtfWheelSlotAnimationSystemImpl();
else if (iid == VectorworksMVR::IID_GdtfXmlParsingError)
resultInterface = new CGdtfXmlParsingErrorImpl();
else if (iid == VectorworksMVR::IID_GdtfTRDM)
resultInterface = new CGdtf_FTRDMImpl();
else if (iid == VectorworksMVR::IID_GdtfMap)
resultInterface = new CGdtfMapImpl();
else if (iid == VectorworksMVR::IID_GdtfArtNet)
resultInterface = new CGdtfArtNetImpl();
else if (iid == VectorworksMVR::IID_GdtfSACN)
resultInterface = new CGdtfSACNImpl();
else if (iid == VectorworksMVR::IID_GdtfDMXPersonality)
resultInterface = new CGdtfDMXPersonalityImpl();
else if (iid == VectorworksMVR::IID_GdtfSoftwareVersionID)
resultInterface = new CGdtfSoftwareVersionIDImpl();
else if (iid == VectorworksMVR::IID_GdtfMeasurement)
resultInterface = new CGdtfMeasurementImpl();
else if (iid == VectorworksMVR::IID_GdtfFilter)
resultInterface = new CGdtfFilterImpl();
else if (iid == VectorworksMVR::IID_GdtfDMXProfile)
resultInterface = new CGdtfDMXProfileImpl();
else if (iid == VectorworksMVR::IID_GdtfPoint)
resultInterface = new CGdtfPointImpl();
else if (iid == VectorworksMVR::IID_GdtfColorSpace)
resultInterface = new CGdtfColorSpaceImpl();
else if (iid == VectorworksMVR::IID_GdtfGamut)
resultInterface = new CGdtfGamutImpl();
else if (iid == VectorworksMVR::IID_GdtfConnector)
resultInterface = new CGdtfConnectorImpl();
else if (iid == VectorworksMVR::Filing::IID_FileIdentifier)
resultInterface = new CFileIdentifier();
else if (iid == VectorworksMVR::Filing::IID_FolderIdentifier )
resultInterface = new CFolderIdentifier();
else if (iid == VectorworksMVR::Filing::IID_ZIPFile)
resultInterface = new CZIPFileImpl();
else if (iid == VectorworksMVR::Filing::IID_RawOSFile)
resultInterface = new CRawOSFileImpl();
else if (iid == XML::IID_XMLFile)
resultInterface = new XML::CXMLFileImpl();
else if (iid == XML::IID_XMLFileNode)
resultInterface = new XML::CXMLFileNodeImpl();
else if (iid == VectorworksMVR::IID_IUtility)
resultInterface = new CUtilityImpl();
else if (iid == VectorworksMVR::IID_GdtfLaserProtocol)
resultInterface = new CGdtfLaserProtocolImpl();
else if (iid == VectorworksMVR::IID_GdtfPinPatch)
resultInterface = new CGdtfPinPatchImpl();
else if (iid == VectorworksMVR::IID_GdtfSubPhysicalUnit)
resultInterface = new CGdtfSubPhysicalUnitImpl();
#ifdef BUILD_MVR_XCHANGE
else if (iid == VectorworksMVR::IID_IMVRxchangeService)
resultInterface = new CMVRxchangeServiceImpl();
#endif
// determine the result values
VCOMError result = kVCOMError_Failed;
if ( outInterface == nullptr )
result = kVCOMError_NotInitialized;
else if ( resultInterface == nullptr )
result = kVCOMError_NoInstance;
else
{
resultInterface->AddRef();
result = kVCOMError_NoError;
*outInterface = resultInterface;
}
return result;
}