get_interface.cpp

Этот пример показывает как получить доступ к экспортируемому интерфейсу.

#include        <loaders/dynamic_lib_loader.h>
#include        <utilities/plugin_interface.h>

class           Base1{};
class           Derived1 : public Base1{};
class           Derived3 : public Base1{};

int main( int argc , char * argv[] )
{
        nitro::DynamicLibLoader         Plugin( "./plugin.dll" );

        nitro::PluginInterface::GetInterface< Derived1 >( Plugin );
        nitro::PluginInterface::GetInterface< Derived3 >( Plugin ); // an exception will be thrown here

        return 0;
}

Generated by  doxygen 1.6.1