Click here to Skip to main content
15,892,643 members
Articles / Desktop Programming / MFC

Multi platform plug-in development made easy!

Rate me:
Please Sign up or sign in to vote.
4.04/5 (25 votes)
7 Mar 20065 min read 101.7K   1.9K   63  
How to use and develop plug-ins for multiple platforms.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>SPL Library: SPL::slaPluginServer class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>SPL::slaPluginServer Class Reference</h1>Abstract plugin server class.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="spl__pluginserver_8h-source.html">spl_pluginserver.h</a>&gt;</code>
<p>
Inheritance diagram for SPL::slaPluginServer:<p><center><img src="classSPL_1_1slaPluginServer__inherit__graph.png" border="0" usemap="#SPL_1_1slaPluginServer__inherit__map" alt="Inheritance graph"></center>
<map name="SPL_1_1slaPluginServer__inherit__map">
<area href="classSPL_1_1slcPluginServer.html" shape="rect" coords="11,625,141,1041" alt="">
<area href="classSPL_1_1slcMutex.html" shape="rect" coords="29,17,123,161" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for SPL::slaPluginServer:<p><center><img src="classSPL_1_1slaPluginServer__coll__graph.png" border="0" usemap="#SPL_1_1slaPluginServer__coll__map" alt="Collaboration graph"></center>
<map name="SPL_1_1slaPluginServer__coll__map">
<area href="classSPL_1_1slcMutex.html" shape="rect" coords="87,17,180,161" alt="">
<area href="classSPL_1_1slcPluginInfo.html" shape="rect" coords="60,212,207,804" alt="">
<area href="classSPL_1_1slcPluginArgs.html" shape="rect" coords="231,412,351,604" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classSPL_1_1slaPluginServer-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a0">slaPluginServer</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor.  <a href="#a0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a1">~slaPluginServer</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default destructor.  <a href="#a1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual long SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a2">GetLoadedPlugins</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the current number of loaded plugins.  <a href="#a2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a3">GetSafedPluginInfo</a> (const long a_lIndex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns information about a plugin from internal plugin info map.  <a href="#a3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a4">GetPluginInfo</a> (const long a_lIndex)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns information about a plugin, use this to safe the info to info map.  <a href="#a4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a5">GetAllPluginInfos</a> (void)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Automatically retrieves information about all loaded plugins.  <a href="#a5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual long SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a6">LoadAllPlugins</a> (const string &amp;a_strPath, const string &amp;a_strWildcard, const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *a_pPluginArgs=NULL)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Loads all plugins with a given wildcard in a specified path.  <a href="#a6"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual long SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a7">LoadPlugin</a> (const string &amp;a_strFileName, const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *a_pPluginArgs=NULL)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Loads a plugin with the specified file name.  <a href="#a7"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a8">UnloadPlugin</a> (const long a_lIndex, const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *a_pPluginArgs=NULL)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unloads a plugin with the given index (0-based).  <a href="#a8"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a9">UnloadAllPlugins</a> (const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *a_pPluginArgs=NULL)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unloads all plugins.  <a href="#a9"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a10">RunPlugin</a> (const long a_lIndex, const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *a_pPluginArgs=NULL)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Runs a plugin with the given index (0-based) and arguments.  <a href="#a10"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual long SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a11">RunAllPlugins</a> (const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *a_pPluginArgs=NULL)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Runs all plugins with the given arguments.  <a href="#a11"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual long SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#a12">Refresh</a> (const string &amp;a_strPath, const string &amp;a_strWildcard, const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *a_pPluginShutdownArgs=NULL, const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *a_pPluginInitArgs=NULL)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unloads all plugins and looks for new plugins in the given path.  <a href="#a12"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void SPL_API&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#b0">Clear</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cleanup all internal maps.  <a href="#b0"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>map&lt; long, SPL_BITTYPE &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#p0">m_mapPluginIds</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Map containing the plugin IDs.  <a href="#p0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>map&lt; long, SPL_BITTYPE <br>
&gt;::iterator&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#p1">itIds</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterator for plugin IDs.  <a href="#p1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>map&lt; long, <a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#p2">m_mapPluginInfos</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Map containing the plugin infos.  <a href="#p2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>map&lt; long, <a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> <br>
&gt;::iterator&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#p3">itInfos</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterator for plugin infos.  <a href="#p3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#p4">m_nullArgs</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dummy argument for internal use.  <a href="#p4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classSPL_1_1slaPluginServer.html#p5">m_nullInfo</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dummy argument for internal use.  <a href="#p5"></a><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Abstract plugin server class. 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0" doxytag="SPL::slaPluginServer::slaPluginServer" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> slaPluginServer::slaPluginServer </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Default constructor. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a1" doxytag="SPL::slaPluginServer::~slaPluginServer" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> slaPluginServer::~<a class="el" href="classSPL_1_1slaPluginServer.html">slaPluginServer</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Default destructor. 
<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="b0" doxytag="SPL::slaPluginServer::Clear" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void slaPluginServer::Clear </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [protected, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Cleanup all internal maps. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a5" doxytag="SPL::slaPluginServer::GetAllPluginInfos" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void SPL_API SPL::slaPluginServer::GetAllPluginInfos </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Automatically retrieves information about all loaded plugins. 
<p>

<p>
Implemented in <a class="el" href="classSPL_1_1slcPluginServer.html#a3">SPL::slcPluginServer</a>, and <a class="el" href="classSPL_1_1slcPluginServer.html#a14">SPL::slcPluginServer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a2" doxytag="SPL::slaPluginServer::GetLoadedPlugins" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> long slaPluginServer::GetLoadedPlugins </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the current number of loaded plugins. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a4" doxytag="SPL::slaPluginServer::GetPluginInfo" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual <a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> SPL_API SPL::slaPluginServer::GetPluginInfo </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const long&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>a_lIndex</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns information about a plugin, use this to safe the info to info map. 
<p>
<dl compact><dt><b>Remarks:</b></dt><dd>Index is 0-based. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>a_lIndex</em>&nbsp;</td><td>[in] The plugin's index. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>A</em>&nbsp;</td><td><a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> structure containing the plugin's information. </td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> </dd></dl>

<p>
Implemented in <a class="el" href="classSPL_1_1slcPluginServer.html#a2">SPL::slcPluginServer</a>, and <a class="el" href="classSPL_1_1slcPluginServer.html#a13">SPL::slcPluginServer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="SPL::slaPluginServer::GetSafedPluginInfo" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> slaPluginServer::GetSafedPluginInfo </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const long&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>a_lIndex</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns information about a plugin from internal plugin info map. 
<p>
<dl compact><dt><b>Remarks:</b></dt><dd>Index is 0-based. </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>a_lIndex</em>&nbsp;</td><td>[in] The plugin's index. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>A</em>&nbsp;</td><td><a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> structure containing the plugin's information. </td></tr>
  </table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a6" doxytag="SPL::slaPluginServer::LoadAllPlugins" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual long SPL_API SPL::slaPluginServer::LoadAllPlugins </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a_strPath</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a_strWildcard</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>a_pPluginArgs</em> = NULL</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Loads all plugins with a given wildcard in a specified path. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>a_strPath</em>&nbsp;</td><td>[in] Valid path for searching the plugins. </td></tr>
    <tr><td valign=top><em>a_strWildcard</em>&nbsp;</td><td>[in] File wildcard (e.g. *.*, *.dll) for the plugins. </td></tr>
    <tr><td valign=top><em>a_pPluginArgs</em>&nbsp;</td><td>[in] Pointer to arguments for initializing all plugins after they have been loaded. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Number of successfully loaded plugins. </dd></dl>

<p>
Implemented in <a class="el" href="classSPL_1_1slcPluginServer.html#a4">SPL::slcPluginServer</a>, and <a class="el" href="classSPL_1_1slcPluginServer.html#a15">SPL::slcPluginServer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a7" doxytag="SPL::slaPluginServer::LoadPlugin" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual long SPL_API SPL::slaPluginServer::LoadPlugin </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a_strFileName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>a_pPluginArgs</em> = NULL</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Loads a plugin with the specified file name. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>a_strFileName</em>&nbsp;</td><td>[in] The plugin's file name. </td></tr>
    <tr><td valign=top><em>a_pPluginArgs</em>&nbsp;</td><td>[in] Pointer to plugin's start function arguments. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The method returns one of the following values: </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>-2</em>&nbsp;</td><td>| Plugin was not found. </td></tr>
    <tr><td valign=top><em>-1</em>&nbsp;</td><td>| Plugin's initialize function was not found. </td></tr>
    <tr><td valign=top><em>0</em>&nbsp;</td><td>| Error while executing the intialisation function. </td></tr>
    <tr><td valign=top><em>1</em>&nbsp;</td><td>| Plugin was successfully loaded. </td></tr>
  </table>
</dl>

<p>
Implemented in <a class="el" href="classSPL_1_1slcPluginServer.html#a5">SPL::slcPluginServer</a>, and <a class="el" href="classSPL_1_1slcPluginServer.html#a16">SPL::slcPluginServer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a12" doxytag="SPL::slaPluginServer::Refresh" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual long SPL_API SPL::slaPluginServer::Refresh </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a_strPath</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>a_strWildcard</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>a_pPluginShutdownArgs</em> = NULL, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>a_pPluginInitArgs</em> = NULL</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Unloads all plugins and looks for new plugins in the given path. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>a_strPath</em>&nbsp;</td><td>[in] Valid path for searching the plugins. </td></tr>
    <tr><td valign=top><em>a_strWildcard</em>&nbsp;</td><td>[in] File wildcard (e.g. *.*, *.dll) for the plugins. </td></tr>
    <tr><td valign=top><em>a_pPluginShutdownArgs</em>&nbsp;</td><td>[in] Pointer to arguments for shutting down all plugins before they will be unloaded. </td></tr>
    <tr><td valign=top><em>a_pPluginInitArgs</em>&nbsp;</td><td>[in] Pointer to arguments for initializing all plugins after they have been loaded. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Number of successfully loaded plugins. </dd></dl>

<p>
Implemented in <a class="el" href="classSPL_1_1slcPluginServer.html#a10">SPL::slcPluginServer</a>, and <a class="el" href="classSPL_1_1slcPluginServer.html#a21">SPL::slcPluginServer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a11" doxytag="SPL::slaPluginServer::RunAllPlugins" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual long SPL_API SPL::slaPluginServer::RunAllPlugins </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>a_pPluginArgs</em> = NULL          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Runs all plugins with the given arguments. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>a_pPluginArgs</em>&nbsp;</td><td>[in] Pointer to plugin's run function arguments. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Number of successfully executed plugins. </dd></dl>

<p>
Implemented in <a class="el" href="classSPL_1_1slcPluginServer.html#a9">SPL::slcPluginServer</a>, and <a class="el" href="classSPL_1_1slcPluginServer.html#a20">SPL::slcPluginServer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a10" doxytag="SPL::slaPluginServer::RunPlugin" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual bool SPL_API SPL::slaPluginServer::RunPlugin </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const long&nbsp;</td>
          <td class="mdname" nowrap> <em>a_lIndex</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>a_pPluginArgs</em> = NULL</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Runs a plugin with the given index (0-based) and arguments. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>a_lIndex</em>&nbsp;</td><td>[in] The plugin's index. </td></tr>
    <tr><td valign=top><em>a_pPluginArgs</em>&nbsp;</td><td>[in] Pointer to plugin's run function arguments. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The method returns one of the following values: </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>true</em>&nbsp;</td><td>| The plugin execution was successful. </td></tr>
    <tr><td valign=top><em>false</em>&nbsp;</td><td>| An error occured while executing the plugin. </td></tr>
  </table>
</dl>

<p>
Implemented in <a class="el" href="classSPL_1_1slcPluginServer.html#a8">SPL::slcPluginServer</a>, and <a class="el" href="classSPL_1_1slcPluginServer.html#a19">SPL::slcPluginServer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a9" doxytag="SPL::slaPluginServer::UnloadAllPlugins" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void SPL_API SPL::slaPluginServer::UnloadAllPlugins </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>a_pPluginArgs</em> = NULL          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Unloads all plugins. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>a_pPluginArgs</em>&nbsp;</td><td>[in] Pointer to arguments for shutting down all plugins after they have been unloaded. </td></tr>
  </table>
</dl>

<p>
Implemented in <a class="el" href="classSPL_1_1slcPluginServer.html#a7">SPL::slcPluginServer</a>, and <a class="el" href="classSPL_1_1slcPluginServer.html#a18">SPL::slcPluginServer</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a8" doxytag="SPL::slaPluginServer::UnloadPlugin" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual bool SPL_API SPL::slaPluginServer::UnloadPlugin </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const long&nbsp;</td>
          <td class="mdname" nowrap> <em>a_lIndex</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>a_pPluginArgs</em> = NULL</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Unloads a plugin with the given index (0-based). 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>a_lIndex</em>&nbsp;</td><td>[in] The plugin's index. </td></tr>
    <tr><td valign=top><em>a_pPluginArgs</em>&nbsp;</td><td>[in] Pointer to plugin's shutdown function arguments. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The method returns one of the following values: </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>true</em>&nbsp;</td><td>| The plugin was unloaded successfully. </td></tr>
    <tr><td valign=top><em>false</em>&nbsp;</td><td>| Could not unload plugin. </td></tr>
  </table>
</dl>

<p>
Implemented in <a class="el" href="classSPL_1_1slcPluginServer.html#a6">SPL::slcPluginServer</a>, and <a class="el" href="classSPL_1_1slcPluginServer.html#a17">SPL::slcPluginServer</a>.    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="p1" doxytag="SPL::slaPluginServer::itIds" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> map&lt; long, SPL_BITTYPE &gt;::iterator <a class="el" href="classSPL_1_1slaPluginServer.html#p1">SPL::slaPluginServer::itIds</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Iterator for plugin IDs. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="p3" doxytag="SPL::slaPluginServer::itInfos" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> map&lt; long, <a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> &gt;::iterator <a class="el" href="classSPL_1_1slaPluginServer.html#p3">SPL::slaPluginServer::itInfos</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Iterator for plugin infos. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="p0" doxytag="SPL::slaPluginServer::m_mapPluginIds" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> map&lt; long, SPL_BITTYPE &gt; <a class="el" href="classSPL_1_1slaPluginServer.html#p0">SPL::slaPluginServer::m_mapPluginIds</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Map containing the plugin IDs. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="p2" doxytag="SPL::slaPluginServer::m_mapPluginInfos" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> map&lt; long, <a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> &gt; <a class="el" href="classSPL_1_1slaPluginServer.html#p2">SPL::slaPluginServer::m_mapPluginInfos</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Map containing the plugin infos. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="p4" doxytag="SPL::slaPluginServer::m_nullArgs" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classSPL_1_1slcPluginArgs.html">slcPluginArgs</a> <a class="el" href="classSPL_1_1slaPluginServer.html#p4">SPL::slaPluginServer::m_nullArgs</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Dummy argument for internal use. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="p5" doxytag="SPL::slaPluginServer::m_nullInfo" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="classSPL_1_1slcPluginInfo.html">slcPluginInfo</a> <a class="el" href="classSPL_1_1slaPluginServer.html#p5">SPL::slaPluginServer::m_nullInfo</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Dummy argument for internal use. 
<p>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="spl__pluginserver_8h-source.html">spl_pluginserver.h</a><li><a class="el" href="spl__pluginserver_8cpp.html">spl_pluginserver.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Sun May 9 15:01:05 2004 for SPL Library by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.6 </small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Germany Germany
I was born in 1982 near Stuttgart / Germany and began my first steps in programming computers at the age of only nine years on an old Commodore CBM 7072. In 2002 I finished my education as IT specialist for software engineering and did my civillian service afterwards. Currently I'm working as leader of the software division in a bigger company located in south west Germany, mainly on software development and research projects for multimedia terminals and user recognition/verification systems.

Comments and Discussions