OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimWebPluginInit.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 // Description: OSSIM Kakadu plugin initialization
8 // code.
9 //
10 //----------------------------------------------------------------------------
11 // $Id: ossimKakaduPluginInit.cpp 20202 2011-11-04 13:57:13Z gpotts $
12 
15 #include <ossim/base/ossimString.h>
20 #include "CurlStreamDefaults.h"
21 #include "ossimCurlStreamFactory.h"
22 
23 static void setWebDescription(ossimString& description)
24 {
25  description = "Web plugin\n";
26  description += "\tsupport http, https web protocols\n";
27 }
28 
29 extern "C"
30 {
33  std::vector<ossimString> theWebObjList;
34 
35  const char* getWebDescription()
36  {
37  return theWebDescription.c_str();
38  }
39 
41  {
42  return (int)theWebObjList.size();
43  }
44 
45  const char* getWebClassName(int idx)
46  {
47  if(idx < (int)theWebObjList.size())
48  {
49  return theWebObjList[idx].c_str();
50  }
51  return (const char*)0;
52  }
53 
54  /* Note symbols need to be exported on windoze... */
56  ossimSharedObjectInfo** info,
57  const char* options)
58  {
62 
63  *info = &myWebInfo;
64  ossimKeywordlist kwl;
65  kwl.parseString(ossimString(options));
66 
68  /* Register our stream factory... */
70  registerFactory( ossim::CurlStreamFactory::instance() );
71 
72  if(ossimString(kwl.find("reader_factory.location")).downcase() == "front")
73  {
74  /* Register the readers... */
76  registerFactoryToFront(ossimWebPluginRequestFactory::instance());
77  }
78  else
79  {
80  /* Register the readers... */
82  registerFactory(ossimWebPluginRequestFactory::instance());
83  }
84  setWebDescription(theWebDescription);
86  }
87 
88  /* Note symbols need to be exported on windoze... */
90  {
91  }
92 }
static CurlStreamFactory * instance()
Represents serializable keyword/value map.
const char * find(const char *key) const
ossimSharedLibraryGetNumberOfClassNamesPtr getNumberOfClassNames
static ossimWebPluginRequestFactory * instance()
ossimSharedObjectInfo myWebInfo
OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize(ossimSharedObjectInfo **info, const char *options)
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
static StreamFactoryRegistry * instance()
static ossimWebRequestFactoryRegistry * instance()
std::vector< ossimString > theWebObjList
ossimSharedLibraryGetDescriptionPtr getDescription
#define OSSIM_PLUGINS_DLL
virtual bool parseString(const std::string &inString)
ossimSharedLibraryGetClassNamesPtr getClassName
OSSIM_PLUGINS_DLL void ossimSharedLibraryFinalize()
const char * getWebClassName(int idx)
ossimString theWebDescription
int getWebNumberOfClassNames()
const char * getWebDescription()
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