1 | // |
---|---|
2 | // TestLibrary.cpp |
3 | // |
4 | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. |
5 | // and Contributors. |
6 | // |
7 | // SPDX-License-Identifier: BSL-1.0 |
8 | // |
9 | |
10 | |
11 | #include "TestPlugin.h" |
12 | #include "Poco/ClassLibrary.h" |
13 | #include <iostream> |
14 | |
15 | |
16 | extern "C"int POCO_LIBRARY_API gimmeFive(); |
17 | |
18 | |
19 | class PluginA: public TestPlugin |
20 | { |
21 | public: |
22 | PluginA() |
23 | { |
24 | } |
25 | |
26 | ~PluginA() |
27 | { |
28 | } |
29 | |
30 | std::string name() const |
31 | { |
32 | return "PluginA"; |
33 | } |
34 | }; |
35 | |
36 | |
37 | class PluginB: public TestPlugin |
38 | { |
39 | public: |
40 | PluginB() |
41 | { |
42 | } |
43 | |
44 | ~PluginB() |
45 | { |
46 | } |
47 | |
48 | std::string name() const |
49 | { |
50 | return "PluginB"; |
51 | } |
52 | }; |
53 | |
54 | |
55 | class PluginC: public TestPlugin |
56 | { |
57 | public: |
58 | PluginC() |
59 | { |
60 | } |
61 | |
62 | ~PluginC() |
63 | { |
64 | } |
65 | |
66 | std::string name() const |
67 | { |
68 | return "PluginC"; |
69 | } |
70 | }; |
71 | |
72 | |
73 | POCO_BEGIN_MANIFEST(TestPlugin) |
74 | POCO_EXPORT_CLASS(PluginA) |
75 | POCO_EXPORT_CLASS(PluginB) |
76 | POCO_EXPORT_SINGLETON(PluginC) |
77 | POCO_END_MANIFEST |
78 | |
79 | |
80 | void pocoInitializeLibrary() |
81 | { |
82 | std::cout << "TestLibrary initializing"<< std::endl; |
83 | } |
84 | |
85 | |
86 | void pocoUninitializeLibrary() |
87 | { |
88 | std::cout << "TestLibrary uninitializing"<< std::endl; |
89 | } |
90 | |
91 | |
92 | int gimmeFive() |
93 | { |
94 | return 5; |
95 | } |
96 |