OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimHdf5PluginInit.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: See top level LICENSE.txt file
4 //
5 // Author: David Burken
6 //
7 // Copied from Mingjie Su's ossimHdfPluginInit.
8 //
9 // Description: OSSIM HDF plugin initialization
10 // code.
11 //
12 //----------------------------------------------------------------------------
13 // $Id$
14 
21 
23 
25 #include "ossimViirsHandler.h"
26 
27 static void setDescription(ossimString& description)
28 {
29  description = "HDF5 Unclass plugin\n\n";
30 
31  vector<ossimString> renderables;
33 
34  description = description + "Datasets enabled for rendering:\n\n";
35  ossim_uint32 idx = 0;
36  for(idx = 0;idx < renderables.size();++idx)
37  {
38  description = description + renderables[idx] + "\n";
39  }
40 
41 }
42 
43 extern "C"
44 {
47  std::vector<ossimString> theObjList;
48 
49  const char* getDescription()
50  {
51  return theDescription.c_str();
52  }
53 
55  {
56  return (int)theObjList.size();
57  }
58 
59  const char* getClassName(int idx)
60  {
61  if(idx < (int)theObjList.size())
62  {
63  return theObjList[0].c_str();
64  }
65  return (const char*)0;
66  }
67 
68  /* Note symbols need to be exported on windoze... */
70  {
74 
75  *info = &myInfo;
76 
77 
78  /* Register the readers... */
80  registerFactory(ossimHdf5PluginHandlerFactory::instance());
81 
82  /* Register hdf projection factory... */
83 // ossimProjectionFactoryRegistry::instance()->
84 // registerFactoryToFront(ossimHdf5ProjectionFactory::instance());
85 
86  setDescription(theDescription);
87  }
88 
89  /* Note symbols need to be exported on windoze... */
91  {
93  unregisterFactory(ossimHdf5PluginHandlerFactory::instance());
94 
95 // ossimProjectionFactoryRegistry::instance()->
96 // unregisterFactory(ossimHdf5ProjectionFactory::instance());
97  }
98 }
static ossimHdf5PluginHandlerFactory * instance()
static method to return instance (the only one) of this class.
OSSIM_PLUGINS_DLL void ossimSharedLibraryFinalize()
ossimString theDescription
ossimSharedLibraryGetNumberOfClassNamesPtr getNumberOfClassNames
const char * getClassName(int idx)
std::vector< ossimString > theObjList
virtual void getSupportedRenderableNames(std::vector< ossimString > &names) const
HDF5 defines different datasets depending on the sensor/format.
const char * getDescription()
ossimSharedObjectInfo myInfo
unsigned int ossim_uint32
ossimSharedLibraryGetDescriptionPtr getDescription
OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize(ossimSharedObjectInfo **info)
#define OSSIM_PLUGINS_DLL
ossimSharedLibraryGetClassNamesPtr getClassName
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()
int getNumberOfClassNames()