Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
coil::DynamicLib Class Reference

DynamicLib class. More...

#include <DynamicLib.h>

Public Member Functions

virtual int close (void)
 Unload of the Dynamic link library. More...
 
virtual int close (void)
 Unload of the Dynamic link library. More...
 
 DynamicLib (int close_handle_on_destruction=1)
 Constructor. More...
 
 DynamicLib (int close_handle_on_destruction=1)
 Constructor. More...
 
 DynamicLib (const char *dynlib_name, int open_mode=COIL_DEFAULT_DYNLIB_MODE, int close_handle_on_destruction=1)
 Constructor. More...
 
 DynamicLib (const char *dynlib_name, int open_mode=COIL_DEFAULT_DYNLIB_MODE, int close_handle_on_destruction=1)
 Constructor. More...
 
 DynamicLib (const DynamicLib &rhs)
 Copy Constructor. More...
 
 DynamicLib (const DynamicLib &rhs)
 Copy Constructor. More...
 
const char * error (void) const
 Return the explanation message about the error. More...
 
const char * error (void) const
 Return the explanation message about the error. More...
 
virtual int open (const char *dll_name, int open_mode=COIL_DEFAULT_DYNLIB_MODE, int close_handle_on_destruction=1)
 Load of the Dynamic link library. More...
 
virtual int open (const char *dll_name, int open_mode=COIL_DEFAULT_DYNLIB_MODE, int close_handle_on_destruction=1)
 Load of the Dynamic link library. More...
 
DynamicLiboperator= (const DynamicLib &rhs)
 Assignment operator. More...
 
DynamicLiboperator= (const DynamicLib &rhs)
 Assignment operator. More...
 
void * symbol (const char *symbol_name)
 Return an address of the memory where a symbol was loaded. More...
 
void * symbol (const char *symbol_name)
 Return an address of the memory where a symbol was loaded. More...
 
virtual ~DynamicLib ()
 Destructor. More...
 
virtual ~DynamicLib ()
 Destructor. More...
 

Static Public Member Functions

static int ForExternTest (void)
 Unit Test. More...
 
static int ForExternTest (void)
 Unit Test. More...
 

Private Attributes

int m_closeflag
 
int m_error
 
void * m_handle
 
HINSTANCE m_handle
 
int m_mode
 
std::string m_name
 

Detailed Description

DynamicLib class.

Definition at line 48 of file posix/coil/DynamicLib.h.

Constructor & Destructor Documentation

coil::DynamicLib::DynamicLib ( int  close_handle_on_destruction = 1)

Constructor.

Constructor

Parameters
close_handle_on_destructionClose flag.

Definition at line 30 of file posix/coil/DynamicLib.cpp.

coil::DynamicLib::DynamicLib ( const char *  dynlib_name,
int  open_mode = COIL_DEFAULT_DYNLIB_MODE,
int  close_handle_on_destruction = 1 
)

Constructor.

Constructor

Parameters
dynlib_nameDynamic link library name.
open_modeOpen mode.
close_handle_on_destructionClose flag.

Definition at line 42 of file posix/coil/DynamicLib.cpp.

coil::DynamicLib::~DynamicLib ( )
virtual

Destructor.

Destructor

Definition at line 61 of file posix/coil/DynamicLib.cpp.

coil::DynamicLib::DynamicLib ( const DynamicLib rhs)

Copy Constructor.

Copy Constructor

Parameters
rhsDynamic link library object of copy source.

Definition at line 73 of file posix/coil/DynamicLib.cpp.

coil::DynamicLib::DynamicLib ( int  close_handle_on_destruction = 1)

Constructor.

Constructor

Parameters
close_handle_on_destructionClose flag.
coil::DynamicLib::DynamicLib ( const char *  dynlib_name,
int  open_mode = COIL_DEFAULT_DYNLIB_MODE,
int  close_handle_on_destruction = 1 
)

Constructor.

Constructor

Parameters
dynlib_nameDynamic link library name.
open_modeOpen mode.
close_handle_on_destructionClose flag.
virtual coil::DynamicLib::~DynamicLib ( )
virtual

Destructor.

Destructor

coil::DynamicLib::DynamicLib ( const DynamicLib rhs)

Copy Constructor.

Copy Constructor

Parameters
rhsDynamic link library object of copy source.

Member Function Documentation

int coil::DynamicLib::close ( void  )
virtual

Unload of the Dynamic link library.

Unload of the Dynamic link library.

Returns
0: successful, -1: failed

Definition at line 127 of file posix/coil/DynamicLib.cpp.

virtual int coil::DynamicLib::close ( void  )
virtual

Unload of the Dynamic link library.

Unload of the Dynamic link library.

Returns
0: successful, -1: failed
const char * coil::DynamicLib::error ( void  ) const

Return the explanation message about the error.

Return the explanation message about the error.

Returns
Error message.(NULL: not an error)

Definition at line 161 of file posix/coil/DynamicLib.cpp.

const char* coil::DynamicLib::error ( void  ) const

Return the explanation message about the error.

Return the explanation message about the error.

Returns
Error message.(NULL: not an error)
static int coil::DynamicLib::ForExternTest ( void  )
inlinestatic

Unit Test.

Unit Test.

Returns
0xdeadbeef

Definition at line 280 of file posix/coil/DynamicLib.h.

static int coil::DynamicLib::ForExternTest ( void  )
inlinestatic

Unit Test.

Unit Test.

Returns
0xdeadbeef

Definition at line 291 of file win32/coil/DynamicLib.h.

int coil::DynamicLib::open ( const char *  dll_name,
int  open_mode = COIL_DEFAULT_DYNLIB_MODE,
int  close_handle_on_destruction = 1 
)
virtual

Load of the Dynamic link library.

Load of the Dynamic link library.

Parameters
dll_nameDynamic link library name.
open_modeOpen mode.
close_handle_on_destructionClose flag.
Returns
0: successful, -1: failed

Definition at line 106 of file posix/coil/DynamicLib.cpp.

virtual int coil::DynamicLib::open ( const char *  dll_name,
int  open_mode = COIL_DEFAULT_DYNLIB_MODE,
int  close_handle_on_destruction = 1 
)
virtual

Load of the Dynamic link library.

Load of the Dynamic link library.

Parameters
dll_nameDynamic link library name.
open_modeOpen mode.
close_handle_on_destructionClose flag.
Returns
0: successful, -1: failed
DynamicLib & coil::DynamicLib::operator= ( const DynamicLib rhs)

Assignment operator.

Copy a Dynamic link library object.

Parameters
rhsDynamic link library object of assignment source.
Returns
Assignment result.

Definition at line 89 of file posix/coil/DynamicLib.cpp.

DynamicLib& coil::DynamicLib::operator= ( const DynamicLib rhs)

Assignment operator.

Copy a Dynamic link library object.

Parameters
rhsDynamic link library object of assignment source.
Returns
Assignment result.
void * coil::DynamicLib::symbol ( const char *  symbol_name)

Return an address of the memory where a symbol was loaded.

Return an address of the memory where a symbol was loaded.

Parameters
symbol_nameSymbol name.
Returns
Memory address.(NULL: failed)

Definition at line 148 of file posix/coil/DynamicLib.cpp.

void* coil::DynamicLib::symbol ( const char *  symbol_name)

Return an address of the memory where a symbol was loaded.

Return an address of the memory where a symbol was loaded.

Parameters
symbol_nameSymbol name.
Returns
Memory address.(NULL: failed)

Member Data Documentation

int coil::DynamicLib::m_closeflag
private

Definition at line 285 of file posix/coil/DynamicLib.h.

int coil::DynamicLib::m_error
private

Definition at line 287 of file posix/coil/DynamicLib.h.

void* coil::DynamicLib::m_handle
private

Definition at line 286 of file posix/coil/DynamicLib.h.

HINSTANCE coil::DynamicLib::m_handle
private

Definition at line 301 of file win32/coil/DynamicLib.h.

int coil::DynamicLib::m_mode
private

Definition at line 284 of file posix/coil/DynamicLib.h.

std::string coil::DynamicLib::m_name
private

Definition at line 283 of file posix/coil/DynamicLib.h.


The documentation for this class was generated from the following files:


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:07:59