Fix weak vtables

This commit is contained in:
Roland Winklmeier
2018-08-24 15:25:47 +02:00
parent 4cf3bc580f
commit 5e38936fd2
30 changed files with 133 additions and 8 deletions

View File

@@ -132,6 +132,10 @@ namespace BlackMisc
return true;
}
// Pin the vtable to this file
void CClientAware::anchor()
{ }
CClientList CClientAware::getClients() const
{
if (this->provider()) { return this->provider()->getClients(); }

View File

@@ -109,6 +109,8 @@ namespace BlackMisc
//! Class which can be directly used to access an \sa IClientProvider object
class BLACKMISC_EXPORT CClientAware : public IProviderAware<IClientProvider>
{
virtual void anchor();
public:
//! \copydoc CClientProvider::getClients
CClientList getClients() const;

View File

@@ -57,6 +57,10 @@ namespace BlackMisc
return true;
}
// pin vtable to this file
void CEcosystemAware::anchor()
{ }
CEcosystem CEcosystemAware::getCurrentEcosystem() const
{
if (!this->hasProvider()) { return CEcosystem::unspecified(); }

View File

@@ -63,6 +63,8 @@ namespace BlackMisc
//! Delegating class which can be directly used to access an \sa IEcosystemProvider instance
class BLACKMISC_EXPORT CEcosystemAware : public IProviderAware<IEcosystemProvider>
{
virtual void anchor();
public:
//! Set the provider
void setEcosystemProvider(IEcosystemProvider *provider) { this->setProvider(provider); }