22 static ossimTrace traceDebug(
"ossimSharedPluginRegistry:debug");
37 return &sharedInstance;
46 if(lib->
load(filename))
49 if(lib->
getSymbol(
"ossimSharedLibraryInitialize"))
62 else if (traceDebug())
65 <<
"ossimSharedPluginRegistry DEBUG:" 66 <<
"ossimSharedLibraryInitialize symbol not found\n" 81 <<
"WARNING: Plugin with the name " << filename << std::endl
82 <<
"Already registered with OSSIM" << std::endl;
97 std::vector<ossimRefPtr<ossimPluginLibrary> >::iterator iter =
theLibraryList.begin();
100 if((*iter).get() == library)
212 for(idx = 0; idx < count; ++idx)
214 std::vector<ossimString> classNames;
219 out <<
"Plugin: " << pi->
getName() << std::endl;
220 out <<
"DESCRIPTION: \n";
222 out <<
"CLASSES SUPPORTED\n ";
223 std::copy(classNames.begin(),
225 std::ostream_iterator<ossimString>(out,
"\n "));
void printAllPluginInformation(std::ostream &out)
void setOptions(const ossimString &options)
bool load(const ossimString &name)
void * getSymbol(const ossimString &name) const
ossim_uint32 getIndex(const ossimPluginLibrary *lib) const
ossim_uint32 getNumberOfPlugins() const
virtual ~ossimSharedPluginRegistry()
std::vector< ossimRefPtr< ossimPluginLibrary > > theLibraryList
ossimSharedPluginRegistry()
static ossimSharedPluginRegistry * instance()
unsigned int ossim_uint32
const ossimString & getName() const
void getClassNames(std::vector< ossimString > &classNames) const
ossimString getDescription() const
bool isLoaded(const ossimFilename &filename) const
Checks if filename is already loaded to avoid duplication.
bool registerPlugin(const ossimFilename &filename, const ossimString &options="")
const ossimPluginLibrary * getPlugin(const ossimFilename &filename) const
ossimFilename file() const
bool unregisterPlugin(int idx)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.