Ipopt Documentation  
 
Loading...
Searching...
No Matches
IpLibraryLoader.hpp
Go to the documentation of this file.
1// Copyright (C) 2021 COIN-OR Foundation
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4
5#ifndef __IPLIBRARYLOADER_HPP__
6#define __IPLIBRARYLOADER_HPP__
7
8#include "IpReferenced.hpp"
9#include "IpException.hpp"
10
11#ifdef _WIN32
12# define IPOPT_SHAREDLIBEXT "dll"
13#elif defined(__APPLE__)
14# define IPOPT_SHAREDLIBEXT "dylib"
15#else
16# define IPOPT_SHAREDLIBEXT "so"
17#endif
18
19namespace Ipopt
20{
21
28{
29private:
30 std::string libname;
31 void* libhandle;
32
37
38public:
41 const std::string& libname_
42 )
43 : libname(libname_),
44 libhandle(NULL)
45 { }
46
49 {
50 unloadLibrary();
51 }
52
55
58
64 const std::string& symbolname
65 );
66};
67
73
74} // namespace Ipopt
75
76#endif /* __IPLIBRARYLOADER_HPP__ */
#define DECLARE_STD_EXCEPTION(__except_type)
Templated class which stores one entry for the CachedResult class.
loading of a library at runtime
LibraryLoader(const LibraryLoader &)
unimplemented copy constructor
void loadLibrary()
tries to load library
void * loadSymbol(const std::string &symbolname)
tries to load symbol
LibraryLoader & operator=(const LibraryLoader &)
unimplemented assigment operator
LibraryLoader(const std::string &libname_)
constructor
void unloadLibrary()
unload library, if loaded
Storing the reference count of all the smart pointers that currently reference it.
#define IPOPTLIB_EXPORT
This file contains a base class for all exceptions and a set of macros to help with exceptions.