2005/5/9

     
 

class SharedLibrary

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::lang::SharedLibrary Class Reference

#include <SharedLibrary.h>

Inheritance diagram for acdk::lang::SharedLibrary:

acdk::lang::Object acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

Loads shared libraries/DLLs at runtime.

API: Java

In the shared library:

  extern C Object* getComponentFactory()
  {
    return new MyLibComponentFactory();
  }
  typedef Object* (*GetComponentFactoryCall)();
#ifdef ACDK_OS_WIN32
  SharedLibrary slib(libmylib.so); 
#else
  SharedLibrary slib(mylib.dll); 
#endif
  slib.loadLibrary();
  GetComponentFactoryCall fptr = (GetComponentFactoryCall)slib.locateFunction(getComponentFactory); 
  if (fptr == 0)
    return;
  RObject obj = (*fptr)();
Author:
Roger Rene Kommer
Version:
Revision
1.11
Date:
Date
2005/04/09 19:26:50


Public Member Functions

 SharedLibrary (IN(RString) libName)
 SharedLibrary (IN(acdk::io::RFile) library)
void loadLibary ()
void unloadLibrary ()
void * locateFunction (const String &name)
void * locateFunction (IN(RString) name)
bool loaded ()

Private Attributes

acdk::lang::RString _library
void * _libReference


Constructor & Destructor Documentation

acdk::lang::SharedLibrary::SharedLibrary IN(RString libName  )  [inline]
 

acdk::lang::SharedLibrary::SharedLibrary IN(acdk::io::RFile library  )  [inline]
 


Member Function Documentation

bool acdk::lang::SharedLibrary::loaded  )  [inline]
 

void acdk::lang::SharedLibrary::loadLibary  ) 
 

void* acdk::lang::SharedLibrary::locateFunction IN(RString name  )  [inline]
 

void* acdk::lang::SharedLibrary::locateFunction const String name  ) 
 

void acdk::lang::SharedLibrary::unloadLibrary  ) 
 


Member Data Documentation

acdk::lang::RString acdk::lang::SharedLibrary::_library [private]
 

void* acdk::lang::SharedLibrary::_libReference [private]