CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
25 #ifndef ODBASETRVECMODULE
26 #define ODBASETRVECMODULE
31 #include "../TrVisRenderClient.h"
100 #define ODRX_DECLARE_PROPERTY_TRV(PropName) \
101 struct _##PropName##_PropDesc : public OdRxObjectImpl<OdRxPropDesc> \
103 OdTrVectorizerPropertyResolverPtr m_pResolver; \
104 static OdRxObjectPtr createObject(const OdTrVectorizerPropertyResolver *pResolver); \
105 static inline OdString _name(); \
106 OdString name() const; \
107 OdRxObjectPtr prop_get(const void* pThis) const; \
108 void prop_put(void* pThis, OdRxObject* pVal); \
111 #define ODRX_GENERATE_PROPERTY_TRV(PropName) \
112 pInfo->putAt(_##PropName##_PropDesc::_name(), _##PropName##_PropDesc::createObject(m_pPropResolver));
114 #define ODRX_INHERIT_PROPERTIES_TRV(BASE_CLASS) \
115 BASE_CLASS::generateProperties(pInfo);
117 #define ODRX_DEFINE_PROPERTY_METHODS_PREFIX_TRV(ClassPrefix, PropName, PropHolder, getMethodName, putMethodName, accessFn) \
118 OdRxObjectPtr ClassPrefix _##PropName##_PropDesc::createObject(const OdTrVectorizerPropertyResolver *pResolver) \
120 OdRxObjectPtr pThis = OdRxObjectPtr(new _##PropName##_PropDesc, kOdRxObjAttach); \
121 static_cast<_##PropName##_PropDesc*>(pThis.get())->m_pResolver = pResolver; \
124 inline OdString ClassPrefix _##PropName##_PropDesc::_name() \
126 static OdString sName(OD_T(#PropName)); \
129 OdString ClassPrefix _##PropName##_PropDesc::name() const \
133 OdRxObjectPtr ClassPrefix _##PropName##_PropDesc::prop_get(const void* pThis) const \
135 return (OdRxObject*)OdRxVariantValue((static_cast<PropHolder*>(m_pResolver->hostByPropsDict((OdRxDictionary*)pThis)))->getMethodName()); \
137 void ClassPrefix _##PropName##_PropDesc::prop_put(void* pThis, OdRxObject* pVal) \
139 (static_cast<PropHolder*>(m_pResolver->hostByPropsDict((OdRxDictionary*)pThis)))->putMethodName(OdRxVariantValue(pVal)->accessFn()); \
142 #define ODRX_DEFINE_PROPERTY_PREFIX_TRV(ClassPrefix, PropName, PropHolder, accessFn) \
143 ODRX_DEFINE_PROPERTY_METHODS_PREFIX_TRV(ClassPrefix, PropName, PropHolder, get_##PropName, put_##PropName, accessFn)
164 #endif // ODBASETRVECMODULE
virtual OdTrVectorizerModuleHost * hostByPropsDict(OdRxDictionary *pInfo) const =0
OdSmartPtr< OdTrVectorizerModuleHost > OdTrVectorizerModuleHostPtr
virtual OdTrVisRenditionPtr createRendition()
virtual void configureForPlatform(OdTrVisRenderClient *, DeviceSetupType)
OdTrVectorizerPropertyResolverPtr m_pPropResolver
OdTrVisRenderClient * renderClient() const
OdTrVectorizerModuleHost()
void setRenderClient(OdTrVisRenderClient *pRenderClient, OdTrVectorizerPropertyResolver *pPropsResolver)
virtual bool onRenderingBegin(OdGsDCRect *=NULL, OdTrVectorizerUpdateHost *=NULL)
virtual void hostUpdate(OdGsDCRect *pRect)=0
virtual void releasePropertyResolver()
virtual OdSmartPtr< OdGsViewImpl > createVectorizeView()
virtual void generateProperties(OdRxDictionary *) const
virtual OdSmartPtr< OdGsBaseVectorizeDevice > createVectorizeDevice(OdTrVectorizerModuleHost *pModuleHost, OdTrVectorizerModuleHost::DeviceSetupType creationHint)
OdSmartPtr< OdTrVectorizerPropertyResolver > OdTrVectorizerPropertyResolverPtr
virtual OdUInt8 * getDirectRenderBuffer(OdUInt32 *, OdUInt32 *, OdUInt32 *=NULL, OdUInt32 *=NULL)
virtual void onRenderingEnd(OdGsDCRect *=NULL, OdTrVectorizerUpdateHost *=NULL)
virtual bool hasDirectRenderBuffer() const
OdTrVisRenderClient * m_pRenderClient
virtual OdTrVectorizerPropertyResolverPtr createPropertyResolver()
OdSmartPtr< OdTrVisRendition > OdTrVisRenditionPtr
virtual DeviceSetupType deviceSetupOverride() const