Mercurial > hg > vamp-website
view code-doc/plugguard_8h.html @ 35:0976232e353b website
* Update for 2.1 release; add wiki link
author | cannam |
---|---|
date | Fri, 25 Sep 2009 15:40:18 +0000 |
parents | cc0be37dc9d3 |
children | 8260c0f4e05b |
line wrap: on
line source
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>VampPluginSDK: plugguard.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.8 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_5b77fce4b90561041d958141b45c7c55.html">vamp-sdk</a> </div> </div> <div class="contents"> <h1>plugguard.h File Reference</h1> <p> <a href="plugguard_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Defines</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="plugguard_8h.html#3bf4e97f131677e5e1505a7a9582d68a">_VAMP_IN_PLUGINSDK</a> 1</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Normal usage should be:. <a href="#3bf4e97f131677e5e1505a7a9582d68a"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="plugguard_8h.html#1a2724ea453971288d3218e4eab3072c">_VAMP_SDK_PLUGSPACE_BEGIN</a>(h)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="plugguard_8h.html#c879bb1077ecc6132ea3581ef9033753">_VAMP_SDK_PLUGSPACE_END</a>(h)</td></tr> </table> <hr><h2>Define Documentation</h2> <a class="anchor" name="3bf4e97f131677e5e1505a7a9582d68a"></a><!-- doxytag: member="plugguard.h::_VAMP_IN_PLUGINSDK" ref="3bf4e97f131677e5e1505a7a9582d68a" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define _VAMP_IN_PLUGINSDK 1 </td> </tr> </table> </div> <div class="memdoc"> <p> Normal usage should be:. <p> <ul> <li>Plugins include <a class="el" href="vamp-sdk_2Plugin_8h.html">vamp-sdk/Plugin.h</a> or <a class="el" href="vamp-sdk_2PluginBase_8h.html">vamp-sdk/PluginBase.h</a>. These files include this header, which specifies an appropriate namespace for the plugin classes to avoid any risk of conflict with non-plugin class implementations in the host on load.</li></ul> <p> <ul> <li>Hosts include <a class="el" href="vamp-hostsdk_2Plugin_8h.html">vamp-hostsdk/Plugin.h</a>, <a class="el" href="vamp-hostsdk_2PluginBase_8h.html">vamp-hostsdk/PluginBase.h</a>, vamp-hostsdk/PluginHostAdapter, <a class="el" href="PluginLoader_8h.html">vamp-hostsdk/PluginLoader.h</a> etc. These files include <a class="el" href="hostguard_8h.html">vamp-hostsdk/hostguard.h</a>, which makes a note that we are in a host. A file such as <a class="el" href="vamp-hostsdk_2Plugin_8h.html">vamp-hostsdk/Plugin.h</a> then simply includes <a class="el" href="vamp-sdk_2Plugin_8h.html">vamp-sdk/Plugin.h</a>, and this guard header takes notice of the fact that it has been included from a host and leaves the plugin namespace unset.</li></ul> <p> Problems will occur when a host includes files directly from the vamp-sdk directory. There are two reasons this might happen: mistake, perhaps owing to ignorance of the fact that this isn't allowed (particularly since it was the normal mechanism in v1 of the SDK); and a wish to incorporate plugin code directly into the host rather than having to load it.<p> What if the host does include a vamp-sdk header by mistake? We can catch it if it's included before something from vamp-hostsdk. If it's included after something from vamp-hostsdk, it will work OK anyway. The remaining problem case is where nothing from vamp-hostsdk is included in the same file. We can't catch that. <p>Definition at line <a class="el" href="plugguard_8h-source.html#l00072">72</a> of file <a class="el" href="plugguard_8h-source.html">plugguard.h</a>.</p> </div> </div><p> <a class="anchor" name="1a2724ea453971288d3218e4eab3072c"></a><!-- doxytag: member="plugguard.h::_VAMP_SDK_PLUGSPACE_BEGIN" ref="1a2724ea453971288d3218e4eab3072c" args="(h)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define _VAMP_SDK_PLUGSPACE_BEGIN </td> <td>(</td> <td class="paramtype">h </td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="plugguard_8h-source.html#l00075">75</a> of file <a class="el" href="plugguard_8h-source.html">plugguard.h</a>.</p> </div> </div><p> <a class="anchor" name="c879bb1077ecc6132ea3581ef9033753"></a><!-- doxytag: member="plugguard.h::_VAMP_SDK_PLUGSPACE_END" ref="c879bb1077ecc6132ea3581ef9033753" args="(h)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define _VAMP_SDK_PLUGSPACE_END </td> <td>(</td> <td class="paramtype">h </td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="plugguard_8h-source.html#l00076">76</a> of file <a class="el" href="plugguard_8h-source.html">plugguard.h</a>.</p> </div> </div><p> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Thu Sep 24 13:40:13 2009 for VampPluginSDK by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> </body> </html>