eLynx SDK
v3.3.0 C++ image processing API reference |
00001 //============================================================================ 00002 // IPluginPackage.h Core.Component package 00003 //============================================================================ 00004 // Usage : definition of plugin package interface 00005 //---------------------------------------------------------------------------- 00006 // Inheritance : 00007 // IPluginPackage 00008 //---------------------------------------------------------------------------- 00009 // Copyright (C) 2006 by eLynx project 00010 // 00011 // This library is free software; you can redistribute it and/or 00012 // modify it under the terms of the GNU Library General Public 00013 // License as published by the Free Software Foundation; either 00014 // version 2 of the License, or (at your option) any later version. 00015 // 00016 // This library is distributed in the hope that it will be useful, 00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00019 // See the GNU Library General Public License for more details. 00020 //---------------------------------------------------------------------------- 00021 #ifndef __IPluginPackage_h__ 00022 #define __IPluginPackage_h__ 00023 00024 #include "UUID.h" 00025 00026 // for windows platform 00027 #ifdef elxWINDOWS 00028 # ifdef PLUGIN_EXPORTS 00029 # define ExportedByPlugin __declspec(dllexport) // declaration in dll library. 00030 # else 00031 # define ExportedByPlugin __declspec(dllimport) // client of the dll library. 00032 # endif 00033 #else 00034 # define ExportedByPlugin // client of the static library. 00035 #endif 00036 00038 #define EXPORT_PLUGIN_PACKAGE "GetPluginPackage" 00039 00040 00041 namespace eLynx { 00042 00043 class IPlugin; 00044 00049 class ExportedByCore IPluginPackage 00050 { 00051 public: 00052 virtual ~IPluginPackage(); 00053 00056 virtual const UUID& GetFamilyType() const = 0; 00057 00060 virtual const UUID& GetID() const = 0; 00061 00064 virtual size_t GetPluginCount() const = 0; 00065 00069 virtual const IPlugin * GetPlugin(size_t iIndex=0) const = 0; 00070 }; 00071 00074 typedef const IPluginPackage * (*elxGetPluginPackage)(); 00075 00077 #define IMPLEMENT_PLUGIN_PACKAGE( _iPluginPackageImpl_ ) \ 00078 extern "C" ExportedByPlugin const IPluginPackage * GetPluginPackage() \ 00079 { \ 00080 static const _iPluginPackageImpl_ ms_Package; \ 00081 return &ms_Package; \ 00082 } 00083 00084 } // namespace eLynx 00085 00086 #endif // __IPluginPackage_h__