OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimJpeg12PluginInit.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 jpeg12 plugin initialization code.
8 //
9 //----------------------------------------------------------------------------
10 // $Id$
11 
16 
17 static void setJpeg12Description(ossimString& description)
18 {
19  description = "NITF 12 bit jpeg reader plugin\n";
20 }
21 
22 extern "C"
23 {
26  std::vector<ossimString> theJpeg12ObjList;
27 
28  const char* getJpeg12Description()
29  {
30  return theJpeg12Description.c_str();
31  }
32 
34  {
35  return (int)theJpeg12ObjList.size();
36  }
37 
38  const char* getJpeg12ClassName(int idx)
39  {
40  if(idx < (int)theJpeg12ObjList.size())
41  {
42  return theJpeg12ObjList[idx].c_str();
43  }
44  return (const char*)0;
45  }
46 
47  /* Note symbols need to be exported on windoze... */
49  const char* options)
50  {
54 
55  *info = &myJpeg12Info;
56  ossimKeywordlist kwl;
57  kwl.parseString(ossimString(options));
58  if(ossimString(kwl.find("reader_factory.location")).downcase() == "front")
59  {
60  /* Register the readers to front... */
62  registerFactoryToFront(ossimJpeg12ReaderFactory::instance());
63  }
64  else
65  {
66  /* Register the readers... */
68  registerFactory(ossimJpeg12ReaderFactory::instance());
69  }
70 
71  setJpeg12Description(theJpeg12Description);
73  }
74 
75  /* Note symbols need to be exported on windoze... */
77  {
79  unregisterFactory(ossimJpeg12ReaderFactory::instance());
80  }
81 }
static ossimJpeg12ReaderFactory * instance()
static method to return instance (the only one) of this class.
Represents serializable keyword/value map.
const char * find(const char *key) const
ossimSharedLibraryGetNumberOfClassNamesPtr getNumberOfClassNames
int getJpeg12NumberOfClassNames()
ossimString theJpeg12Description
std::vector< ossimString > theJpeg12ObjList
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
Adds ossimJpeg12Writer to the typeList.
OSSIM_PLUGINS_DLL void ossimSharedLibraryFinalize()
ossimSharedObjectInfo myJpeg12Info
ossimSharedLibraryGetDescriptionPtr getDescription
#define OSSIM_PLUGINS_DLL
virtual bool parseString(const std::string &inString)
ossimSharedLibraryGetClassNamesPtr getClassName
const char * getJpeg12Description()
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()
const char * getJpeg12ClassName(int idx)
OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize(ossimSharedObjectInfo **info, const char *options)