GetPlugins.h (Firebird-3.0.2.32703-0.tar.bz2) | : | GetPlugins.h (Firebird-3.0.4.33054-0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 145 | skipping to change at line 145 | |||
LocalStatus ls; | LocalStatus ls; | |||
CheckStatusWrapper status; | CheckStatusWrapper status; | |||
void getPlugin() | void getPlugin() | |||
{ | { | |||
currentPlugin = (P*) pluginSet->getPlugin(&status); | currentPlugin = (P*) pluginSet->getPlugin(&status); | |||
check(&status); | check(&status); | |||
} | } | |||
}; | }; | |||
// template required to use AutoPtr for plugins | ||||
template <typename P> | ||||
class ReleasePlugin | ||||
{ | ||||
public: | ||||
static void clear(P* ptr) | ||||
{ | ||||
if (ptr) | ||||
PluginManagerInterfacePtr()->releasePlugin(ptr); | ||||
} | ||||
}; | ||||
template <typename P> | ||||
class AutoPlugin : public AutoPtr<P, ReleasePlugin> | ||||
{ | ||||
public: | ||||
AutoPlugin(P* p = NULL) | ||||
: AutoPtr<P, ReleasePlugin>(p) | ||||
{ } | ||||
}; | ||||
} // namespace Firebird | } // namespace Firebird | |||
#endif // FB_COMMON_CLASSES_GET_PLUGINS | #endif // FB_COMMON_CLASSES_GET_PLUGINS | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 22 lines changed or added |