mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 16:57:16 +01:00
4a6bfc086c
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
96 lines
1.0 KiB
C++
96 lines
1.0 KiB
C++
//
|
|
// TestLibrary.cpp
|
|
//
|
|
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#include "TestPlugin.h"
|
|
#include "Poco/ClassLibrary.h"
|
|
#include <iostream>
|
|
|
|
|
|
extern "C" int POCO_LIBRARY_API gimmeFive();
|
|
|
|
|
|
class PluginA: public TestPlugin
|
|
{
|
|
public:
|
|
PluginA()
|
|
{
|
|
}
|
|
|
|
~PluginA()
|
|
{
|
|
}
|
|
|
|
std::string name() const
|
|
{
|
|
return "PluginA";
|
|
}
|
|
};
|
|
|
|
|
|
class PluginB: public TestPlugin
|
|
{
|
|
public:
|
|
PluginB()
|
|
{
|
|
}
|
|
|
|
~PluginB()
|
|
{
|
|
}
|
|
|
|
std::string name() const
|
|
{
|
|
return "PluginB";
|
|
}
|
|
};
|
|
|
|
|
|
class PluginC: public TestPlugin
|
|
{
|
|
public:
|
|
PluginC()
|
|
{
|
|
}
|
|
|
|
~PluginC()
|
|
{
|
|
}
|
|
|
|
std::string name() const
|
|
{
|
|
return "PluginC";
|
|
}
|
|
};
|
|
|
|
|
|
POCO_BEGIN_MANIFEST(TestPlugin)
|
|
POCO_EXPORT_CLASS(PluginA)
|
|
POCO_EXPORT_CLASS(PluginB)
|
|
POCO_EXPORT_SINGLETON(PluginC)
|
|
POCO_END_MANIFEST
|
|
|
|
|
|
void pocoInitializeLibrary()
|
|
{
|
|
std::cout << "TestLibrary initializing" << std::endl;
|
|
}
|
|
|
|
|
|
void pocoUninitializeLibrary()
|
|
{
|
|
std::cout << "TestLibrary uninitialzing" << std::endl;
|
|
}
|
|
|
|
|
|
int gimmeFive()
|
|
{
|
|
return 5;
|
|
}
|