OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimPluginInit.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: LGPL
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Author: Garrett Potts
8 //*******************************************************************
9 // $Id$
17 
18 
19 namespace ossimplugins
20 {
21 
22 
23  static void setCnesDescription(ossimString& description)
24  {
25  description = "OSSIM Plugin\n\n";
26  std::vector<ossimString> projectionTypes;
27 
29  ossim_uint32 idx = 0;
30  description = "Projecitons Supported:\n\n";
31  for(idx = 0; idx < projectionTypes.size();++idx)
32  {
33  description += projectionTypes[idx] + "\n";
34  }
35  }
36 
37 
38  extern "C"
39  {
42  std::vector<ossimString> cnesObjList;
43  const char* getCnesDescription()
44  {
45  return cnesDescription.c_str();
46  }
48  {
49  return (int)cnesObjList.size();
50  }
51  const char* getCnesClassName(int idx)
52  {
53  if(idx < (int)cnesObjList.size())
54  {
55  return cnesObjList[idx].c_str();
56  }
57  return (const char*)0;
58  }
59 
60  /* Note symbols need to be exported on windoze... */
62  ossimSharedObjectInfo** info)
63  {
67 
68  *info = &cnesInfo;
69 
72  registerFactory(ossimPluginReaderFactory::instance());
73 
80  registerFactoryToFront(ossimPluginProjectionFactory::instance());
81 
82  setCnesDescription(cnesDescription);
85  }
86 
87  /* Note symbols need to be exported on windoze... */
89  {
91  unregisterFactory(ossimPluginReaderFactory::instance());
92 
94  unregisterFactory(ossimPluginProjectionFactory::instance());
95  }
96 
97  }
98 }
OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize(ossimSharedObjectInfo **info)
const char * getCnesDescription()
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
OSSIM_PLUGINS_DLL void ossimSharedLibraryFinalize()
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
Adds ossimTerraSarTiffReader to the typeList.
ossimString cnesDescription
ossimSharedLibraryGetNumberOfClassNamesPtr getNumberOfClassNames
int getCnesNumberOfClassNames()
static ossimPluginProjectionFactory * instance()
std::vector< ossimString > cnesObjList
unsigned int ossim_uint32
ossimSharedLibraryGetDescriptionPtr getDescription
#define OSSIM_PLUGINS_DLL
ossimSharedLibraryGetClassNamesPtr getClassName
static ossimProjectionFactoryRegistry * instance()
ossimSharedObjectInfo cnesInfo
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
static ossimImageHandlerRegistry * instance()
static ossimPluginReaderFactory * instance()
static method to return instance (the only one) of this class.
const char * getCnesClassName(int idx)