├── README.md
├── cmakelists.txt
├── doc
├── build
│ ├── Doxyfile
│ ├── Doxygen.hpp
│ ├── doxygen.css
│ ├── footer.htm
│ └── header.htm
└── html
│ └── logo.png
├── example
├── PlumaCoreTest
│ ├── cmakelists.txt
│ └── main.cpp
├── cmakelists.txt
├── src
│ ├── host
│ │ └── main.cpp
│ ├── interface
│ │ └── Warrior.hpp
│ └── plugin
│ │ ├── Eagle.cpp
│ │ ├── Eagle.hpp
│ │ ├── Jaguar.cpp
│ │ ├── Jaguar.hpp
│ │ ├── SimpleWarrior.cpp
│ │ └── SimpleWarrior.hpp
├── testPlumaCore
│ └── main.cpp
└── testPlumaPlugins
│ ├── interface
│ └── Warrior.hpp
│ ├── loaderManager
│ └── main.cpp
│ └── plugin
│ ├── Eagle.cpp
│ ├── Eagle.hpp
│ ├── Jaguar.cpp
│ ├── Jaguar.hpp
│ ├── SimpleWarrior.cpp
│ └── SimpleWarrior.hpp
├── include
└── Pluma
│ ├── Config.hpp
│ ├── Connector.hpp
│ ├── Host.hpp
│ ├── PluginManager.hpp
│ ├── Pluma.hpp
│ ├── Pluma.inl
│ ├── PlumaCore.hpp
│ ├── PlumaPipe.hpp
│ └── Provider.hpp
└── src
└── Pluma
├── DLibrary.cpp
├── DLibrary.hpp
├── Dir.cpp
├── Dir.hpp
├── Host.cpp
├── PluginManager.cpp
├── PlumaCore.cpp
├── PlumaCore.h
├── PlumaPipe.cpp
├── PlumaPipe.h
├── Provider.cpp
├── cmakelists.txt
├── out
└── build
│ └── x64-Debug (默认值)
│ └── VSInheritEnvironments.txt
└── uce-dirent.h
/README.md:
--------------------------------------------------------------------------------
1 | Pluma - Plug-in Management Framework
2 |
3 | 1. About
4 |
5 | Pluma stands for PLUg-in MAnagement framework, and also for PLUg-in Minimal Architecture.
6 | It's small, cross-platform and simple to use. Support and more information at http://pluma-framework.sourceforge.net
7 |
8 |
9 | 2. Licence
10 |
11 | Source code is provided under the terms of the zlib/libpng License (http://www.opensource.org/licenses/zlib-license.php):
12 |
13 | Pluma - Plug-in Management Framework
14 | Copyright (C) 2010-2012 Gil Costa (gsaurus@gmail.com)
15 |
16 | This software is provided 'as-is', without any express or implied warranty.
17 | In no event will the authors be held liable for any damages arising from the use of this software.
18 |
19 | Permission is granted to anyone to use this software for any purpose,
20 | including commercial applications, and to alter it and redistribute it freely,
21 | subject to the following restrictions:
22 |
23 | 1. The origin of this software must not be misrepresented;
24 | you must not claim that you wrote the original software.
25 | If you use this software in a product, an acknowledgment
26 | in the product documentation would be appreciated but is not required.
27 |
28 | 2. Altered source versions must be plainly marked as such,
29 | and must not be misrepresented as being the original software.
30 |
31 | 3. This notice may not be removed or altered from any source distribution.
32 |
33 |
34 | 3. First of all, thank the original author for his hard work, and then thank the GNU program.
35 | Since the official author has not updated this framework for many years, nor has it adapted to cmake,
36 | the source code has been tested and the structure has been changed here.
37 | 2020-06-06 FunNing
38 |
39 | 首先感谢原作者的辛勤劳作,再者感谢GNU计划。
40 | 由于官方作者多年未更新此框架,也并未适配cmake,
41 | 这里针对源码进行了测试和结构进行改动。
42 | 2020-06-06 FunNing
43 |
44 |
--------------------------------------------------------------------------------
/cmakelists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 2.8.0)
2 |
3 | project(Pluma)
4 |
5 | set(CMAKE_BUILD_RPATH ${CMAKE_CURRENT_SOURCE_DIR}/build)
6 | message(${CMAKE_BUILD_RPATH})
7 |
8 | add_definitions(
9 | -DPLUMA_EXPORTS
10 | )
11 |
12 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BUILD_RPATH}/lib_Debug)
13 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BUILD_RPATH}/lib_Release)
14 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BUILD_RPATH}/lib_MinSizeRel)
15 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BUILD_RPATH}/lib_RelInfoDebug)
16 |
17 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BUILD_RPATH}/bin_Debug)
18 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BUILD_RPATH}/bin_Release)
19 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BUILD_RPATH}/bin_MinSizeRel)
20 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BUILD_RPATH}/bin_RelInfoDebug)
21 |
22 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BUILD_RPATH}/lib_Debug)
23 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BUILD_RPATH}/lib_Release)
24 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BUILD_RPATH}/lib_MinSizeRel)
25 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BUILD_RPATH}/lib_RelInfoDebug)
26 |
27 | set(SOURCE_HEAD ${CMAKE_CURRENT_SOURCE_DIR}/include)
28 | set(SOURCE_CPP ${CMAKE_CURRENT_SOURCE_DIR}/src)
29 |
30 | include_directories(
31 | ${SOURCE_HEAD}
32 | ${SOURCE_HEAD}/Pluma
33 | ${SOURCE_CPP}
34 | ${SOURCE_CPP}/Pluma
35 | )
36 |
37 | aux_source_directory(${SOURCE_CPP}/Pluma PlumaStaticSRC)
38 |
39 | add_library(Pluma STATIC ${PlumaStaticSRC})
40 |
41 | subdirs(${CMAKE_CURRENT_SOURCE_DIR}/example)
42 |
--------------------------------------------------------------------------------
/doc/build/Doxygen.hpp:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////
2 | /// \mainpage
3 | ///
4 | /// \section welcome Welcome
5 | /// Welcome to Pluma documentation. Here you will find a detailed
6 | /// view of all Pluma classes.
7 | /// If you are looking for support, you can visit the official website
8 | /// at http://pluma-framework.sourceforge.net/.
9 | ///
10 | /// CSS based on SFML1.6 documentation
11 | ///
12 | /// \section example Short Example
13 | /// A short example to demonstrate Pluma usage:
14 | /// A host application define a Device interface. A certain plugin
15 | /// defines a Keyboard, witch is a Device.
16 | /// The host will use DeviceProviders to create objects of type Device.
17 | /// The plugin will provide host specifically with a KeyboardProvider.
18 | ///
19 | /// Device hpp (shared):
20 | /// \code
21 | /// #include
22 | /// class Device{
23 | /// public:
24 | /// virtual std::string getDescription() const = 0;
25 | /// };
26 | /// // create DevicedProvider class
27 | /// PLUMA_PROVIDER_HEADER(Device);
28 | /// \endcode
29 | ///
30 | /// Device cpp (shared):
31 | /// \code
32 | /// #include "Device.hpp"
33 | /// generate DevicedProvider with version 6, and compatible with at least v.3
34 | /// PLUMA_PROVIDER_SOURCE(Device, 6, 3);
35 | /// \endcode
36 | ///
37 | ///
38 | ///
39 | /// Keyboard code on the plugin side:
40 | /// \code
41 | /// #include
42 | /// #include "Device.hpp"
43 | ///
44 | /// class Keyboard: public Device{
45 | /// public:
46 | /// std::string getDescription() const{
47 | /// return "keyboard";
48 | /// }
49 | /// };
50 | ///
51 | /// // create KeyboardProvider, it implements DeviceProvider
52 | /// PLUMA_INHERIT_PROVIDER(Keyboard, Device);
53 | /// \endcode
54 | ///
55 | /// plugin connector:
56 | /// \code
57 | /// #include
58 | /// #include "Keyboard.hpp"
59 | ///
60 | /// PLUMA_CONNECTOR
61 | /// bool connect(pluma::Host& host){
62 | /// // add a keyboard provider to host
63 | /// host.add( new KeyboardProvider() );
64 | /// return true;
65 | /// }
66 | /// \endcode
67 | ///
68 | ///
69 | /// Host application code:
70 | /// \code
71 | /// #include
72 | ///
73 | /// #include "Device.hpp"
74 | /// #include
75 | /// #include
76 | ///
77 | /// int main(){
78 | ///
79 | /// pluma::Pluma plugins;
80 | /// // Tell plugins manager to accept providers of the type DeviceProvider
81 | /// plugins.acceptProviderType();
82 | /// // Load library "standard_devices" from folder "plugins"
83 | /// plugins.load("plugins", "standard_devices");
84 | ///
85 | /// // Get device providers into a vector
86 | /// std::vector providers;
87 | /// plugins.getProviders(providers);
88 | ///
89 | /// // create a Device from the first provider
90 | /// if (!providers.empty()){
91 | /// Device* myDevice = providers.first()->create();
92 | /// // do something with myDevice
93 | /// std::cout << device->getDescription() << std::endl;
94 | /// // and delete it in the end
95 | /// delete myDevice;
96 | /// }
97 | /// return 0;
98 | /// }
99 | /// \endcode
100 | ///
101 | ////////////////////////////////////////////////////////////
102 |
--------------------------------------------------------------------------------
/doc/build/doxygen.css:
--------------------------------------------------------------------------------
1 | div#logo
2 | {
3 | margin-bottom : 1em;
4 | background : url("./logo-bg.jpg") repeat-x;
5 | }
6 |
7 | div#logo a
8 | {
9 | display : block;
10 | }
11 |
12 | p#footer
13 | {
14 | text-decoration : overline;
15 | color : #606060;
16 | padding-top : 1em;
17 | text-align : center;
18 | font-size : smaller;
19 | }
20 |
21 | p#footer a
22 | {
23 | color : #007298;
24 | text-decoration : none;
25 | }
26 |
27 | BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
28 | font-family: Geneva, Arial, Helvetica, sans-serif;
29 | }
30 | BODY,TD {
31 | font-size: 90%;
32 | }
33 | H1 {
34 | text-align : center;
35 | margin-top : 0px;
36 | color : #2090B0;
37 | font-size : 160%;
38 | }
39 | H2 {
40 | font-size: 120%;
41 | }
42 | H3 {
43 | font-size: 100%;
44 | }
45 | CAPTION { font-weight: bold }
46 | DIV.qindex {
47 | width: 100%;
48 | background-color: #E0FFE0;
49 | border: 1px dotted #808080;
50 | text-align: center;
51 | margin: 2px;
52 | padding: 2px;
53 | line-height: 140%;
54 | }
55 | DIV.nav {
56 | width: 100%;
57 | background-color: #e8eef2;
58 | border: 1px solid #84b0c7;
59 | text-align: center;
60 | margin: 2px;
61 | padding: 2px;
62 | line-height: 140%;
63 | }
64 | DIV.navtab {
65 | background-color: #e8eef2;
66 | border: 1px solid #84b0c7;
67 | text-align: center;
68 | margin: 2px;
69 | margin-right: 15px;
70 | padding: 2px;
71 | }
72 | TD.navtab {
73 | font-size: 70%;
74 | }
75 | A.qindex {
76 | text-decoration: none;
77 | font-weight: bold;
78 | }
79 | A.qindex:visited {
80 | text-decoration: none;
81 | font-weight: bold;
82 | }
83 | A.qindex:hover {
84 | text-decoration: none;
85 | background-color: #ddddff;
86 | }
87 | A.qindexHL {
88 | text-decoration: none;
89 | font-weight: bold;
90 | background-color: #6666cc;
91 | color: #ffffff;
92 | border: 1px double #9295C2;
93 | }
94 | A.qindexHL:hover {
95 | text-decoration: none;
96 | background-color: #6666cc;
97 | color: #ffffff;
98 | }
99 | A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
100 | A.el { text-decoration: none; font-weight: bold }
101 | A.elRef { font-weight: bold }
102 | A.code:link { text-decoration: none; font-weight: normal; border-bottom : 1px dotted #808080; color: black;}
103 | A.code:visited { text-decoration: none; font-weight: normal; border-bottom : 1px dotted #808080; color: black;}
104 | A.codeRef:link { font-weight: normal; color: #0000FF}
105 | A.codeRef:visited { font-weight: normal; color: #0000FF}
106 | /*A:hover { text-decoration: none; background-color: #f2f2ff }*/
107 | DL.el { margin-left: -1cm }
108 | .fragment {
109 | font-family: monospace, fixed;
110 | font-size: 95%;
111 | }
112 | PRE.fragment {
113 | border: 1px solid #CCCCCC;
114 | background-color: #f5f5f5;
115 | margin-top: 4px;
116 | margin-bottom: 4px;
117 | margin-left: 2px;
118 | margin-right: 8px;
119 | padding-left: 6px;
120 | padding-right: 6px;
121 | padding-top: 4px;
122 | padding-bottom: 4px;
123 | }
124 | DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
125 |
126 | DIV.groupHeader {
127 | margin-left: 16px;
128 | margin-top: 12px;
129 | margin-bottom: 6px;
130 | font-weight: bold;
131 | }
132 | DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
133 | BODY {
134 | background: white;
135 | color: black;
136 | margin-right: 20px;
137 | margin-left: 20px;
138 | }
139 | TD.indexkey {
140 | background-color: #e8eef2;
141 | font-weight: bold;
142 | padding-right : 10px;
143 | padding-top : 2px;
144 | padding-left : 10px;
145 | padding-bottom : 2px;
146 | margin-left : 0px;
147 | margin-right : 0px;
148 | margin-top : 2px;
149 | margin-bottom : 2px;
150 | border: 1px solid #CCCCCC;
151 | }
152 | TD.indexvalue {
153 | background-color: #e8eef2;
154 | font-style: italic;
155 | padding-right : 10px;
156 | padding-top : 2px;
157 | padding-left : 10px;
158 | padding-bottom : 2px;
159 | margin-left : 0px;
160 | margin-right : 0px;
161 | margin-top : 2px;
162 | margin-bottom : 2px;
163 | border: 1px solid #CCCCCC;
164 | }
165 | TR.memlist {
166 | background-color: #f0f0f0;
167 | }
168 | P.formulaDsp { text-align: center; }
169 | IMG.formulaDsp { }
170 | IMG.formulaInl { vertical-align: middle; }
171 | SPAN.keyword { color: #0000FF }
172 | SPAN.keywordtype { color: #0000FF }
173 | SPAN.keywordflow { color: #0000FF }
174 | SPAN.comment { color: #008000 }
175 | SPAN.preprocessor { color: #008080 }
176 | SPAN.stringliteral { color: #008080 }
177 | SPAN.charliteral { color: #008080 }
178 | .mdescLeft {
179 | padding: 0px 8px 4px 8px;
180 | font-size: 80%;
181 | font-style: italic;
182 | background-color: #FAFAFA;
183 | border-top: 1px none #E0E0E0;
184 | border-right: 1px none #E0E0E0;
185 | border-bottom: 1px none #E0E0E0;
186 | border-left: 1px none #E0E0E0;
187 | margin: 0px;
188 | }
189 | .mdescRight {
190 | padding: 0px 8px 4px 8px;
191 | font-size: 80%;
192 | font-style: italic;
193 | background-color: #FAFAFA;
194 | border-top: 1px none #E0E0E0;
195 | border-right: 1px none #E0E0E0;
196 | border-bottom: 1px none #E0E0E0;
197 | border-left: 1px none #E0E0E0;
198 | margin: 0px;
199 | }
200 | .memItemLeft {
201 | padding: 1px 0px 0px 8px;
202 | margin: 4px;
203 | border-top-width: 1px;
204 | border-right-width: 1px;
205 | border-bottom-width: 1px;
206 | border-left-width: 1px;
207 | border-top-color: #E0E0E0;
208 | border-right-color: #E0E0E0;
209 | border-bottom-color: #E0E0E0;
210 | border-left-color: #E0E0E0;
211 | border-top-style: solid;
212 | border-right-style: none;
213 | border-bottom-style: none;
214 | border-left-style: none;
215 | background-color: #FAFAFA;
216 | font-size: 80%;
217 | }
218 | .memItemRight {
219 | padding: 1px 8px 0px 8px;
220 | margin: 4px;
221 | border-top-width: 1px;
222 | border-right-width: 1px;
223 | border-bottom-width: 1px;
224 | border-left-width: 1px;
225 | border-top-color: #E0E0E0;
226 | border-right-color: #E0E0E0;
227 | border-bottom-color: #E0E0E0;
228 | border-left-color: #E0E0E0;
229 | border-top-style: solid;
230 | border-right-style: none;
231 | border-bottom-style: none;
232 | border-left-style: none;
233 | background-color: #FAFAFA;
234 | font-size: 80%;
235 | }
236 | .memTemplItemLeft {
237 | padding: 1px 0px 0px 8px;
238 | margin: 4px;
239 | border-top-width: 1px;
240 | border-right-width: 1px;
241 | border-bottom-width: 1px;
242 | border-left-width: 1px;
243 | border-top-color: #E0E0E0;
244 | border-right-color: #E0E0E0;
245 | border-bottom-color: #E0E0E0;
246 | border-left-color: #E0E0E0;
247 | border-top-style: none;
248 | border-right-style: none;
249 | border-bottom-style: none;
250 | border-left-style: none;
251 | background-color: #FAFAFA;
252 | font-size: 80%;
253 | }
254 | .memTemplItemRight {
255 | padding: 1px 8px 0px 8px;
256 | margin: 4px;
257 | border-top-width: 1px;
258 | border-right-width: 1px;
259 | border-bottom-width: 1px;
260 | border-left-width: 1px;
261 | border-top-color: #E0E0E0;
262 | border-right-color: #E0E0E0;
263 | border-bottom-color: #E0E0E0;
264 | border-left-color: #E0E0E0;
265 | border-top-style: none;
266 | border-right-style: none;
267 | border-bottom-style: none;
268 | border-left-style: none;
269 | background-color: #FAFAFA;
270 | font-size: 80%;
271 | }
272 | .memTemplParams {
273 | padding: 1px 0px 0px 8px;
274 | margin: 4px;
275 | border-top-width: 1px;
276 | border-right-width: 1px;
277 | border-bottom-width: 1px;
278 | border-left-width: 1px;
279 | border-top-color: #E0E0E0;
280 | border-right-color: #E0E0E0;
281 | border-bottom-color: #E0E0E0;
282 | border-left-color: #E0E0E0;
283 | border-top-style: solid;
284 | border-right-style: none;
285 | border-bottom-style: none;
286 | border-left-style: none;
287 | color: #606060;
288 | background-color: #FAFAFA;
289 | font-size: 80%;
290 | }
291 | .search { color: #003399;
292 | font-weight: bold;
293 | }
294 | FORM.search {
295 | margin-bottom: 0px;
296 | margin-top: 0px;
297 | }
298 | INPUT.search { font-size: 75%;
299 | color: #000080;
300 | font-weight: normal;
301 | background-color: #e8eef2;
302 | }
303 | TD.tiny { font-size: 75%;
304 | }
305 | a {
306 | color: #2090B0;
307 | }
308 | a:visited {
309 | color: #2090B0;
310 | }
311 | .dirtab { padding: 4px;
312 | border-collapse: collapse;
313 | border: 1px solid #84b0c7;
314 | }
315 | TH.dirtab { background: #e8eef2;
316 | font-weight: bold;
317 | }
318 | HR { height: 1px;
319 | border: none;
320 | border-top: 1px solid black;
321 | }
322 |
323 | /* Style for detailed member documentation */
324 | .memtemplate {
325 | font-size: 80%;
326 | color: #606060;
327 | font-weight: normal;
328 | }
329 | .memnav {
330 | background-color: #e8eef2;
331 | border: 1px solid #84b0c7;
332 | text-align: center;
333 | margin: 2px;
334 | margin-right: 15px;
335 | padding: 2px;
336 | }
337 | .memitem {
338 | /*padding: 4px;*/
339 | background-color: #F0FFF0;
340 | border-width: 1px;
341 | border-style: solid;
342 | border-color: #808080;
343 | /*-moz-border-radius: 8px 8px 8px 8px;*/
344 | }
345 | .memname {
346 | white-space: nowrap;
347 | font-weight: bold;
348 | }
349 | .memdoc{
350 | padding-left: 10px;
351 | }
352 | .memproto {
353 | background-color: #D0FFD0;
354 | width: 100%;
355 | border-bottom-width: 1px;
356 | border-bottom-style: dotted;
357 | border-bottom-color: #808080;
358 | font-weight: bold;
359 | /*-moz-border-radius: 8px 8px 8px 8px;*/
360 | }
361 | .paramkey {
362 | text-align: right;
363 | }
364 | .paramtype {
365 | white-space: nowrap;
366 | }
367 | .paramname {
368 | color: #602020;
369 | font-style: italic;
370 | white-space: nowrap;
371 | }
372 | /* End Styling for detailed member documentation */
373 |
374 | /* for the tree view */
375 | .ftvtree {
376 | font-family: sans-serif;
377 | margin:0.5em;
378 | }
379 | .directory { font-size: 9pt; font-weight: bold; }
380 | .directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; }
381 | .directory > h3 { margin-top: 0; }
382 | .directory p { margin: 0px; white-space: nowrap; }
383 | .directory div { display: none; margin: 0px; }
384 | .directory img { vertical-align: -30%; }
385 |
--------------------------------------------------------------------------------
/doc/build/footer.htm:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |