+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <title>Pluma - Plug-in Management Framework</title>
- <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- <link href="tabs.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="logo">
- <img src="./logo.png" title="Pluma home" alt="Pluma logo" />
- </div>
-<!-- Generated by Doxygen 1.8.6 -->
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li class="current"><a href="index.htm"><span>Main Page</span></a></li>
- <li><a href="annotated.htm"><span>Classes</span></a></li>
- <li><a href="files.htm"><span>Files</span></a></li>
- </ul>
- </div>
-</div><!-- top -->
-<div class="header">
- <div class="headertitle">
-<div class="title">Pluma Documentation</div> </div>
-</div><!--header-->
-<div class="contents">
-<div class="textblock"><h1><a class="anchor" id="welcome"></a>
-Welcome</h1>
-<p>Welcome to Pluma documentation. Here you will find a detailed view of all Pluma <a href="./annotated.htm">classes</a>.<br/>
- If you are looking for support, you can visit the official website at <a href="http://pluma-framework.sourceforge.net/">http://pluma-framework.sourceforge.net/</a>.<br/>
-<br/>
-</p>
-<p>CSS based on <a href="http://www.sfml-dev.org/documentation/1.6/">SFML1.6 documentation</a><br/>
-</p>
-<h1><a class="anchor" id="example"></a>
-Short Example</h1>
-<p>A short example to demonstrate Pluma usage:<br/>
- A host application define a Device interface. A certain plugin defines a Keyboard, witch is a Device. The host will use DeviceProviders to create objects of type Device. The plugin will provide host specifically with a KeyboardProvider.<br/>
-</p>
-<p>Device hpp (shared): </p>
-<div class="fragment"><div class="line"><span class="preprocessor">#include <Pluma/Pluma.hpp></span></div>
-<div class="line"><span class="keyword">class </span>Device{</div>
-<div class="line"><span class="keyword">public</span>:</div>
-<div class="line"> <span class="keyword">virtual</span> std::string getDescription() <span class="keyword">const</span> = 0;</div>
-<div class="line">};</div>
-<div class="line"><span class="comment">// create DevicedProvider class</span></div>
-<div class="line">PLUMA_PROVIDER_HEADER(Device);</div>
-</div><!-- fragment --><p>Device cpp (shared): </p>
-<div class="fragment"><div class="line"><span class="preprocessor">#include "Device.hpp"</span></div>
-<div class="line">generate DevicedProvider with version 6, and compatible with at least v.3</div>
-<div class="line">PLUMA_PROVIDER_SOURCE(Device, 6, 3);</div>
-</div><!-- fragment --><p><br/>
- Keyboard code on the plugin side: </p>
-<div class="fragment"><div class="line"><span class="preprocessor">#include <Pluma/Pluma.hpp></span></div>
-<div class="line"><span class="preprocessor">#include "Device.hpp"</span></div>
-<div class="line"></div>
-<div class="line"><span class="keyword">class </span>Keyboard: <span class="keyword">public</span> Device{</div>
-<div class="line"><span class="keyword">public</span>:</div>
-<div class="line"> std::string getDescription()<span class="keyword"> const</span>{</div>
-<div class="line"> <span class="keywordflow">return</span> <span class="stringliteral">"keyboard"</span>;</div>
-<div class="line"> }</div>
-<div class="line">};</div>
-<div class="line"></div>
-<div class="line"><span class="comment">// create KeyboardProvider, it implements DeviceProvider</span></div>
-<div class="line">PLUMA_INHERIT_PROVIDER(Keyboard, Device);</div>
-</div><!-- fragment --><p>plugin connector: </p>
-<div class="fragment"><div class="line"><span class="preprocessor">#include <Pluma/Connector.hpp></span></div>
-<div class="line"><span class="preprocessor">#include "Keyboard.hpp"</span></div>
-<div class="line"></div>
-<div class="line">PLUMA_CONNECTOR</div>
-<div class="line"><span class="keywordtype">bool</span> connect(<a class="code" href="classpluma_1_1Host.htm">pluma::Host</a>& host){</div>
-<div class="line"> <span class="comment">// add a keyboard provider to host</span></div>
-<div class="line"> host.<a class="code" href="classpluma_1_1Host.htm#ab673ba94ff56a12cdf2a7a25ebb8cc36">add</a>( <span class="keyword">new</span> KeyboardProvider() );</div>
-<div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
-<div class="line">}</div>
-</div><!-- fragment --><p>Host application code: </p>
-<div class="fragment"><div class="line"><span class="preprocessor">#include <Pluma/Pluma.hpp></span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#include "Device.hpp"</span></div>
-<div class="line"><span class="preprocessor">#include <iostream></span></div>
-<div class="line"><span class="preprocessor">#include <vector></span></div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">int</span> main(){</div>
-<div class="line"></div>
-<div class="line"> <a class="code" href="classpluma_1_1Pluma.htm">pluma::Pluma</a> plugins;</div>
-<div class="line"> <span class="comment">// Tell plugins manager to accept providers of the type DeviceProvider</span></div>
-<div class="line"> plugins.<a class="code" href="classpluma_1_1Pluma.htm#a200c59b0983c7ca53d11b03cf8220bc7">acceptProviderType</a><DeviceProvider>();</div>
-<div class="line"> <span class="comment">// Load library "standard_devices" from folder "plugins"</span></div>
-<div class="line"> plugins.<a class="code" href="classpluma_1_1PluginManager.htm#aa00400d23efa8a8f94e44dd1c5bf54e6">load</a>(<span class="stringliteral">"plugins"</span>, <span class="stringliteral">"standard_devices"</span>);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Get device providers into a vector</span></div>
-<div class="line"> std::vector<DeviceProvider*> providers;</div>
-<div class="line"> plugins.<a class="code" href="classpluma_1_1Pluma.htm#a49fa0b2b4497885c4e978259be0a7abe">getProviders</a>(providers);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// create a Device from the first provider</span></div>
-<div class="line"> <span class="keywordflow">if</span> (!providers.empty()){</div>
-<div class="line"> Device* myDevice = providers.first()->create();</div>
-<div class="line"> <span class="comment">// do something with myDevice</span></div>
-<div class="line"> std::cout << device->getDescription() << std::endl;</div>
-<div class="line"> <span class="comment">// and delete it in the end</span></div>
-<div class="line"> <span class="keyword">delete</span> myDevice;</div>
-<div class="line"> }</div>
-<div class="line"> <span class="keywordflow">return</span> 0;</div>
-<div class="line">}</div>
-</div><!-- fragment --> </div></div><!-- contents -->
-
- <p id="footer">
- :: Copyright © 2011 Gil Costa, all rights reserved ::
- Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen 1.7.4</a> ::
- </p>
- </body>
-</html>