OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
include
ossim
plugin
ossimDynamicLibrary.h
Go to the documentation of this file.
1
//*******************************************************************
2
// Copyright (C) 2000 ImageLinks Inc.
3
//
4
// LICENSE: MIT
5
//
6
// See LICENSE.txt file in the top level directory for more details.
7
//
8
// Author: Garrett Potts
9
//
10
//*************************************************************************
11
// $Id: ossimDynamicLibrary.h 23380 2015-06-19 16:37:45Z dburken $
12
#ifndef ossimDynamicLibrary_HEADER
13
#define ossimDynamicLibrary_HEADER 1
14
15
#include <
ossim/ossimConfig.h
>
16
#include <
ossim/base/ossimConstants.h
>
17
#include <
ossim/base/ossimString.h
>
18
#include <
ossim/base/ossimReferenced.h
>
19
20
21
#if defined(_WIN32) || defined(__WIN32__)
22
#include <windows.h>
23
#else
24
#include <dlfcn.h>
25
#endif
26
27
class
OSSIM_DLL
ossimDynamicLibrary
:
public
ossimReferenced
28
{
29
public
:
30
ossimDynamicLibrary
();
31
ossimDynamicLibrary
(
const
ossimString
& name);
32
virtual
~
ossimDynamicLibrary
();
33
// return TRUE if the library was loaded successfully
34
bool
isLoaded
()
const
{
return
theLibrary != 0; }
35
36
// load the library with the given name (full or not), return TRUE on
37
// success
38
bool
load(
const
ossimString
& name);
39
40
bool
load();
41
// unload the library, also done automatically in dtor
42
void
unload();
43
44
// load a symbol from the library, return NULL if an error occured or
45
// symbol wasn't found
46
void
*getSymbol(
const
ossimString
& name)
const
;
47
48
const
ossimString
&
getName
()
const
49
{
50
return
theLibraryName;
51
}
52
53
protected
:
54
// the handle to DLL or NULL
55
#if defined(_WIN32)
56
HINSTANCE theLibrary;
57
#else
58
void
*
theLibrary
;
59
#endif
60
ossimString
theLibraryName
;
61
62
};
63
64
#endif
65
ossimConstants.h
ossimDynamicLibrary::isLoaded
bool isLoaded() const
Definition:
ossimDynamicLibrary.h:34
ossimReferenced
ossimReferenced allows for shared object ref counting if the reference count ever gets to 0 or less i...
Definition:
ossimReferenced.h:23
ossimConfig.h
ossimDynamicLibrary::theLibrary
void * theLibrary
Definition:
ossimDynamicLibrary.h:58
ossimString.h
ossimDynamicLibrary::getName
const ossimString & getName() const
Definition:
ossimDynamicLibrary.h:48
OSSIM_DLL
#define OSSIM_DLL
Definition:
ossimConstants.h:72
ossimDynamicLibrary::theLibraryName
ossimString theLibraryName
Definition:
ossimDynamicLibrary.h:60
ossimDynamicLibrary
Definition:
ossimDynamicLibrary.h:27
ossimReferenced.h
ossimString
Definition:
ossimString.h:22
Generated on Fri Aug 3 2018 08:46:46 for OSSIM - Open Source Software Image Map by
1.8.14