Overview   Class List   Class Hierarchy   Class Members   Functions & Constants   Defines   Header Files  

uima::util::DllProcLoaderFile Class Reference

List of all members.

Detailed Description

The class DllProcLoaderFile is used to load specific procedures from a DLL (shared library) by their name.

       typedef void (*MYPROC)(const char *);

       foo(const uima::util::Filename & crclFilename)
       {
          uima::util::DllProcLoaderFile clDll(crclFilename);

          if(clDll.isValid())
             {
             MYPROC utProc = (MYPROC) clDll.getProcedure("myFunction");

             if(utProc)
                (utProc)("My message");   // call my procedure in DLL
             else
                // error handling
             }
       }
The loaded functions may be called as long as the DLL is loaded. Calling a loaded function after the destructor of DllProcLoaderFile has unloaded the DLL will cause unexpected results. (An application crash is very likely to happen.)

NOTE: dropped the Cos Special Requirements for AIX 4.2 and below


Public Member Functions

 ~DllProcLoaderFile (void)
Constructors
 DllProcLoaderFile (const Filename &crclFilename)
 instantiate a DLL object and load the specified DLL
Properties
bool isValid (void) const
 return TRUE if the DLL was loaded successfully
TyProcedure getProcedure (const char *cpszProcName)
 return a pointer to the specified DLL function or NULL if the specified function cannot be found in this DLL
TyErrorId getErrorId (void) const
 map APR error code (status) of last call to a UIMACPP error code.
TyMessageId getErrorMsgId (void) const
 map APR error code to a UIMACPP message id
const char * getErrorMsg (void) const
 return a pointer to the error msg (if any)
const FilenamegetFilename (void) const
 return the file's filename
bool isExistent (void) const
 determine whether a file exists for filename on file system


Constructor & Destructor Documentation

uima::util::DllProcLoaderFile::DllProcLoaderFile const Filename crclFilename  )  [inline]
 

instantiate a DLL object and load the specified DLL

uima::util::DllProcLoaderFile::~DllProcLoaderFile void   )  [inline]
 


Member Function Documentation

bool uima::util::DllProcLoaderFile::isValid void   )  const [inline]
 

return TRUE if the DLL was loaded successfully

TyProcedure uima::util::DllProcLoaderFile::getProcedure const char *  cpszProcName  )  [inline]
 

return a pointer to the specified DLL function or NULL if the specified function cannot be found in this DLL

TyErrorId uima::util::DllProcLoaderFile::getErrorId void   )  const [inline]
 

map APR error code (status) of last call to a UIMACPP error code.

TyMessageId uima::util::DllProcLoaderFile::getErrorMsgId void   )  const [inline]
 

map APR error code to a UIMACPP message id

const char * uima::util::DllProcLoaderFile::getErrorMsg void   )  const [inline]
 

return a pointer to the error msg (if any)

const Filename& uima::util::DllProcLoaderFile::getFilename void   )  const [inline]
 

return the file's filename

bool uima::util::DllProcLoaderFile::isExistent void   )  const [inline]
 

determine whether a file exists for filename on file system


The documentation for this class was generated from the following file:
Generated on Mon Oct 1 16:04:14 2012 for UIMACPP API by  doxygen 1.3.9.1