OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimGeoPdfPluginInit.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: See top level LICENSE.txt file
4 //
5 // Author: Mingjie Su
6 //
7 // Description: OSSIM GeoPdf plugin initialization
8 // code.
9 //
10 //----------------------------------------------------------------------------
11 // $Id: ossimGeoPdfPluginInit.cpp 20935 2012-05-18 14:19:30Z dburken $
12 
18 
20 #include "ossimGeoPdfInfoFactory.h"
21 
22 static void setGeoPdfDescription(ossimString& description)
23 {
24  description = "GeoPdf reader plugin\n\n";
25 }
26 
27 
28 extern "C"
29 {
32  std::vector<ossimString> theGeoPdfObjList;
33 
34  const char* getGeoPdfDescription()
35  {
36  return theGeoPdfDescription.c_str();
37  }
38 
40  {
41  return (int)theGeoPdfObjList.size();
42  }
43 
44  const char* getGeoPdfClassName(int idx)
45  {
46  if(idx < (int)theGeoPdfObjList.size())
47  {
48  return theGeoPdfObjList[idx].c_str();
49  }
50  return (const char*)0;
51  }
52 
53  /* Note symbols need to be exported on windoze... */
55  ossimSharedObjectInfo** info)
56  {
60 
61  *info = &myGeoPdfInfo;
62 
63  /* Register the readers... */
65  registerFactory(ossimGeoPdfReaderFactory::instance(), false);
66 
67  /* Register GeoPdf info objects... */
69  registerFactory(ossimGeoPdfInfoFactory::instance());
70 
71  setGeoPdfDescription(theGeoPdfDescription);
73  theGeoPdfObjList.push_back("ossimGeoPdfInfo");
74  }
75 
76  /* Note symbols need to be exported on windoze... */
78  {
80  unregisterFactory(ossimGeoPdfReaderFactory::instance());
81 
83  unregisterFactory(ossimGeoPdfInfoFactory::instance());
84  }
85 }
const char * getGeoPdfClassName(int idx)
OSSIM_PLUGINS_DLL void ossimSharedLibraryFinalize()
int getGeoPdfNumberOfClassNames()
ossimSharedLibraryGetNumberOfClassNamesPtr getNumberOfClassNames
ossimSharedObjectInfo myGeoPdfInfo
static ossimGeoPdfReaderFactory * instance()
static method to return instance (the only one) of this class.
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
Adds ossimGeoPdfWriter to the typeList.
ossimSharedLibraryGetDescriptionPtr getDescription
#define OSSIM_PLUGINS_DLL
const char * getGeoPdfDescription()
ossimSharedLibraryGetClassNamesPtr getClassName
static ossimGeoPdfInfoFactory * instance()
static ossimInfoFactoryRegistry * instance()
instance method
std::vector< ossimString > theGeoPdfObjList
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()
OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize(ossimSharedObjectInfo **info)
ossimString theGeoPdfDescription