MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / PluginSet

Class PluginSet

src/yvalve/PluginManager.cpp:829–894  ·  view source on GitHub ↗

Provides access to plugins of given type / name.

Source from the content-addressed store, hash-verified

827
828 // Provides access to plugins of given type / name.
829 class PluginSet final : public RefCntIface<IPluginSetImpl<PluginSet, CheckStatusWrapper> >
830 {
831 public:
832 // IPluginSet implementation
833 const char* getName() const
834 {
835 return currentPlugin.hasData() ? currentName.c_str() : NULL;
836 }
837
838 const char* getModuleName() const
839 {
840 return currentPlugin.hasData() ? currentPlugin->getPluggedModule()->getName() : NULL;
841 }
842
843 void set(CheckStatusWrapper* status, const char* newName)
844 {
845 try
846 {
847 namesList = newName;
848 namesList.alltrim(" \t");
849 next(status);
850 }
851 catch (const Firebird::Exception& ex)
852 {
853 ex.stuffException(status);
854 }
855 }
856
857 IPluginBase* getPlugin(CheckStatusWrapper* status);
858 void next(CheckStatusWrapper* status);
859
860 PluginSet(unsigned int pinterfaceType, const char* pnamesList,
861 IFirebirdConf* fbConf)
862 : interfaceType(pinterfaceType), namesList(getPool()),
863 currentName(getPool()), currentPlugin(NULL),
864 firebirdConf(fbConf)
865 {
866 namesList.assign(pnamesList);
867 namesList.alltrim(" \t");
868 FbLocalStatus statusWrapper;
869 next(&statusWrapper);
870 check(&statusWrapper);
871 }
872
873 private:
874 unsigned int interfaceType;
875 PathName namesList;
876
877 PathName currentName;
878 RefPtr<ConfiguredPlugin> currentPlugin; // Missing data in this field indicates EOF
879
880 RefPtr<IFirebirdConf> firebirdConf;
881 MasterInterfacePtr masterInterface;
882
883 RefPtr<PluginModule> loadModule(const PluginLoadInfo& info);
884
885 void loadError(const Arg::StatusVector& error)
886 {

Callers 1

getPluginsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected