PluginManager ++.
2+- , , .
, , . 40 + , .
[DLL- ++-] , , .
// ..
, , , , .
( -, Java):
/* This is the basic plugin header file that every plugin DLL has to include
Use your compilers pragmas/keywords to export the entire class from the DLL
In Microsoft land the keywords are _declspec( dllexport ) to export the class
from the base DLL and __declspec( dllimport ) to import the class into other
code. I'm using the MS keywords here because I don't remember how this is done
in other compilers. :)
*/
#if BUILDING_BASE_PLUGIN
/* You're compiling the DLL that exports the Plugin Base
#define BASE_DLL_EXPORT declspec( dllexport )
#else
/* You're compiling code that uses the plugin base
#define BASE_DLL_EXPORT declspec( dllimport )
#endif
class DLL_EXPORT SerialPortPluginBase
{
public:
enum SerialPortPluginError{ SUCCESS = 0, ERROR_1, ERROR_2, ERROR_ETC };
virtual SerialPortPluginError Open( /*Parameters*/ ) = 0;
virtual SerialPortPluginError Read( /*Parameters*/ ) = 0;
virtual SerialPortPluginError Write( /*Parameters*/ ) = 0;
virtual SerialPortPluginError Close( /*Parameters*/ ) = 0;
static std::string pluginName = "SerialPortPluginBase";
static int version;
};
, , / DLL (. ).
DLL/SO.
. .
, .:)