TuttleOFX
1
|
00001 #ifndef _TUTTLE_HOST_DESCRIPTOR_HPP_ 00002 #define _TUTTLE_HOST_DESCRIPTOR_HPP_ 00003 00004 #include <tuttle/host/ofx/OfxhImageEffectHost.hpp> 00005 #include <tuttle/host/ImageEffectNode.hpp> 00006 00007 namespace tuttle { 00008 namespace host { 00009 00010 /** a host combines several things... 00011 * - a factory to create a new instance of your plugin 00012 * - it also gets to filter some calls during in the 00013 * API to check for validity and perform custom 00014 * operations (eg: add extra properties). 00015 * - it provides a description of the host application 00016 * which is passed back to the plugin. 00017 * 00018 * @todo how to support multiple APIs... 00019 */ 00020 class Host : public tuttle::host::ofx::imageEffect::OfxhImageEffectHost 00021 { 00022 public: 00023 Host(); 00024 00025 /** Create a new instance of an image effect plug-in. 00026 * 00027 * It is called by ImageEffectPlugin::createInstance which the 00028 * client code calls when it wants to make a new instance. 00029 * 00030 * @arg clientData - the clientData passed into the ImageEffectPlugin::createInstance 00031 * @arg plugin - the plugin being created 00032 * @arg desc - the descriptor for that plugin 00033 * @arg context - the context to be created in 00034 */ 00035 tuttle::host::ImageEffectNode* newInstance( tuttle::host::ofx::imageEffect::OfxhImageEffectPlugin& plugin, 00036 tuttle::host::ofx::imageEffect::OfxhImageEffectNodeDescriptor& desc, 00037 const std::string& context ) const; 00038 /// Override this to create a descriptor, this makes the 'root' descriptor 00039 tuttle::host::ofx::imageEffect::OfxhImageEffectNodeDescriptor* makeDescriptor( tuttle::host::ofx::imageEffect::OfxhImageEffectPlugin& plugin ) const; 00040 00041 /// used to construct a context description, rootContext is the main context 00042 tuttle::host::ofx::imageEffect::OfxhImageEffectNodeDescriptor* makeDescriptor( const tuttle::host::ofx::imageEffect::OfxhImageEffectNodeDescriptor& rootContext, 00043 tuttle::host::ofx::imageEffect::OfxhImageEffectPlugin& plug ) const; 00044 00045 /// used to construct populate the cache 00046 tuttle::host::ofx::imageEffect::OfxhImageEffectNodeDescriptor* makeDescriptor( const std::string& bundlePath, 00047 tuttle::host::ofx::imageEffect::OfxhImageEffectPlugin& plug ) const; 00048 #ifndef SWIG 00049 /// vmessage 00050 OfxStatus vmessage( const char* type, 00051 const char* id, 00052 const char* format, 00053 va_list args ) const; 00054 #endif 00055 }; 00056 00057 } 00058 } 00059 00060 #endif