OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimOpenCvPluginInit.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: See top level LICENSE.txt file
4 //
5 // Author: David Hicks
6 //
7 // Description: OpenCV plugin initialization code.
8 //
9 //----------------------------------------------------------------------------
10 // $Id
11 
15 #include <ossim/base/ossimString.h>
17 
18 static void setOpenCVDescription(ossimString& description)
19 {
20  description = "OpenCV plugin\n\n";
21 }
22 
23 
24 extern "C"
25 {
28  std::vector<ossimString> theOpenCVObjList;
29 
30  const char* getOpenCVDescription()
31  {
32  return theOpenCVDescription.c_str();
33  }
34 
36  {
37  return (int)theOpenCVObjList.size();
38  }
39 
40  const char* getOpenCVClassName(int idx)
41  {
42  if(idx < (int)theOpenCVObjList.size())
43  {
44  return theOpenCVObjList[idx].c_str();
45  }
46  return (const char*)0;
47  }
48 
49  /* Note symbols need to be exported on windoze... */
51  ossimSharedObjectInfo** info)
52  {
56 
57  *info = &myOpenCVInfo;
58 
59  /* Register objects... */
61  registerFactory(ossimOpenCvObjectFactory::instance());
62 
63  setOpenCVDescription(theOpenCVDescription);
65  }
66 
67  /* Note symbols need to be exported on windoze... */
69  {
71  unregisterFactory(ossimOpenCvObjectFactory::instance());
72  }
73 }
ossimString theOpenCVDescription
const char * getOpenCVClassName(int idx)
ossimSharedObjectInfo myOpenCVInfo
OSSIM_PLUGINS_DLL void ossimSharedLibraryFinalize()
static ossimOpenCvObjectFactory * instance()
static method to return instance (the only one) of this class.
ossimSharedLibraryGetNumberOfClassNamesPtr getNumberOfClassNames
static ossimObjectFactoryRegistry * instance()
const char * getOpenCVDescription()
ossimSharedLibraryGetDescriptionPtr getDescription
#define OSSIM_PLUGINS_DLL
ossimSharedLibraryGetClassNamesPtr getClassName
virtual void getTypeNameList(std::vector< ossimString > &typeList) const
Adds ossimLasWriter to the typeList.
OSSIM_PLUGINS_DLL void ossimSharedLibraryInitialize(ossimSharedObjectInfo **info)
int getOpenCVNumberOfClassNames()
std::vector< ossimString > theOpenCVObjList
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