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)
OdSmartPtr< OdTrVectorizerPropertyResolver > OdTrVectorizerPropertyResolverPtr
OdSmartPtr< OdTrVectorizerModuleHost > OdTrVectorizerModuleHostPtr
OdSmartPtr< OdTrVisRendition > OdTrVisRenditionPtr
virtual OdSmartPtr< OdGsViewImpl > createVectorizeView()
virtual OdSmartPtr< OdGsBaseVectorizeDevice > createVectorizeDevice(OdTrVectorizerModuleHost *pModuleHost, OdTrVectorizerModuleHost::DeviceSetupType creationHint)
virtual OdTrVectorizerPropertyResolverPtr createPropertyResolver()
virtual void releasePropertyResolver()
virtual bool hasDirectRenderBuffer() const
void setRenderClient(OdTrVisRenderClient *pRenderClient, OdTrVectorizerPropertyResolver *pPropsResolver)
OdTrVectorizerModuleHost()
virtual void onRenderingEnd(OdGsDCRect *=NULL, OdTrVectorizerUpdateHost *=NULL)
virtual void configureForPlatform(OdTrVisRenderClient *, DeviceSetupType)
virtual void generateProperties(OdRxDictionary *) const
OdTrVisRenderClient * m_pRenderClient
virtual OdUInt8 * getDirectRenderBuffer(OdUInt32 *, OdUInt32 *, OdUInt32 *=NULL, OdUInt32 *=NULL)
virtual OdTrVisRenditionPtr createRendition()
virtual DeviceSetupType deviceSetupOverride() const
OdTrVectorizerPropertyResolverPtr m_pPropResolver
virtual bool onRenderingBegin(OdGsDCRect *=NULL, OdTrVectorizerUpdateHost *=NULL)
OdTrVisRenderClient * renderClient() const
virtual OdTrVectorizerModuleHost * hostByPropsDict(OdRxDictionary *pInfo) const =0
virtual void hostUpdate(OdGsDCRect *pRect)=0