28 static void setGdalDescription(
ossimString& description)
30 description =
"GDAL Plugin\n\n";
32 int driverCount = GDALGetDriverCount();
34 description +=
"GDAL Supported formats\n";
35 for(idx = 0; idx < driverCount; ++idx)
37 GDALDriverH driver = GDALGetDriver(idx);
40 description +=
" name: ";
41 description +=
ossimString(GDALGetDriverShortName(driver)) +
" " +
ossimString(GDALGetDriverLongName(driver)) +
"\n";
46 int driverCount = GDALGetDriverCount();
50 std::function<bool(GDALDriverH, ossimRegExp &)>
51 isDriverEnabled = [](GDALDriverH driver,
ossimRegExp ®Expression) ->
bool {
return true; };
55 if (!driverRegExString.
empty())
57 isDriverEnabled = [](GDALDriverH driver,
ossimRegExp ®Expression) ->
bool {
return regExpression.
find(GDALGetDriverShortName(driver)); };
62 if (!driverRegExString.
empty())
64 isDriverEnabled = [](GDALDriverH driver,
ossimRegExp ®Expression) ->
bool {
return !regExpression.
find(GDALGetDriverShortName(driver)); };
68 if (driverRegExString.
empty())
70 driverRegExString = options.
find(
"enable_drivers");
71 if (!driverRegExString.
empty())
73 isDriverEnabled = [](GDALDriverH driver,
ossimRegExp ®Expression) ->
bool {
return regExpression.find(GDALGetDriverShortName(driver)); };
77 driverRegExString = options.
find(
"disable_drivers");
78 if (!driverRegExString.
empty())
80 isDriverEnabled = [](GDALDriverH driver,
ossimRegExp ®Expression) ->
bool {
return !regExpression.find(GDALGetDriverShortName(driver)); };
84 if (!driverRegExString.
empty())
88 for (idx = 0; idx < driverCount; ++idx)
90 GDALDriverH driver = GDALGetDriver(idx);
93 if (!isDriverEnabled(driver, driverRegEx))
95 GDALDeregisterDriver(driver);
96 GDALDestroyDriver(driver);
121 return (
const char*)0;
154 setValidDrivers(kwl);
const char * getGdalDescription()
static ossimGdalObjectFactory * instance()
int getGdalNumberOfClassNames()
Represents serializable keyword/value map.
const char * find(const char *key) const
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
static ossimImageWriterFactoryRegistry * instance()
ossimSharedLibraryGetNumberOfClassNamesPtr getNumberOfClassNames
static ossimGdalFactory * instance()
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
Adds list of objects this factory supports.
static ossimObjectFactoryRegistry * instance()
std::vector< ossimString > gdalObjList
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
ossimSharedObjectInfo gdalInfo
void unregisterFactory(T *factory)
Will remove the factory from the registry.
static ossimGdalOverviewBuilderFactory * instance()
static instance method.
static ossimGdalInfoFactory * instance()
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
ossimSharedLibraryGetDescriptionPtr getDescription
void compile(const char *)
#define OSSIM_PLUGINS_DLL
void registerFactory(T *factory, bool pushToFrontFlag=false)
Will register a factory to the factory list.
ossimString gdalDescription
virtual bool parseString(const std::string &inString)
ossimSharedLibraryGetClassNamesPtr getClassName
const char * getGdalClassName(int idx)
static ossimProjectionFactoryRegistry * instance()
static ossimOverviewBuilderFactoryRegistry * instance()
instance method for access to theInstance pointer.
static ossimEnvironmentUtility * instance()
static ossimInfoFactoryRegistry * instance()
instance method
static ossimGdalProjectionFactory * instance()
static ossimGdalImageWriterFactory * instance()
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
ossimString getEnvironmentVariable(const ossimString &variable) const
OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize(ossimSharedObjectInfo **info, const char *options)
static ossimImageHandlerRegistry * instance()
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
Method to populate a list of supported types for the factory.
OSSIM_PLUGINS_DLL void ossimSharedLibraryFinalize()
std::string::size_type find(const std::string &s, std::string::size_type pos=0) const
Searches for s as a substring of *this, beginning at character pos of *this.
void registerFactory(ossimInfoFactoryInterface *factory)
Method to add factory to registry.