Overview
Features
Download
Documentation
Community
Add-Ons & Services

SharedLibrary Manifests

Please post support and help requests here.

SharedLibrary Manifests

Postby zarthrag » 14 Aug 2008, 21:38

First of all, congrats - this is an excellent library that has eliminated a lot of extra dependencies in my code.

I'm using poco to manage plugins for a game engine. These plugins need to load a minimum of two classes, one singleton for the module, plus one or more "task" classes. According to the documentation, only one base class can be exported using a classloader. Is this absolute?

I'd prefer not to have to split the plugins into multiple projects/dlls, as they are closely related. Can multiple manifests be used with a single dll? Anything to allow two base classes to come from the same library.
zarthrag
 
Posts: 3
Joined: 30 Jul 2008, 21:54
Location: Other

Re: SharedLibrary Manifests

Postby alex » 15 Aug 2008, 01:26

> Can multiple manifests be used with a single dll? Anything to allow two base classes to come from the same library.

Yes, use named manifest:

Code: Select all

class PluginBaseA { ... }
class PluginA : public PluginBaseA { ... }
POCO_BEGIN_NAMED_MANIFEST(PluginA, PluginBaseA)
   POCO_EXPORT_CLASS(PluginA)
POCO_END_MANIFEST

class PluginBaseB { ... }
class PluginB : public PluginBaseB { ... }
POCO_BEGIN_NAMED_MANIFEST(PluginB, PluginBaseB)
   POCO_EXPORT_CLASS(PluginB)
POCO_END_MANIFEST


Alex
alex
 
Posts: 1143
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: SharedLibrary Manifests

Postby zarthrag » 15 Aug 2008, 05:03

Thanks! That fits the bill perfectly.
zarthrag
 
Posts: 3
Joined: 30 Jul 2008, 21:54
Location: Other


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron