Simple Dynamic Loader Library Documentation (v. 1.1.0)
Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

sdl Namespace Reference

name space for the Simple Dynamic Loader. More...


Classes

class  sdl::Exception
 generic SDL exception More...
class  sdl::TypeMismatch
 type mismatch exception. More...
class  sdl::UnknownMember
 unknown member exception. More...
class  sdl::Member
 proxy for a data member or member function a dynamically-loaded class More...
class  sdl::Object
 proxy for an object of a dynamically-loaded class More...
class  sdl::Class
 meta-class whose instances represent dynamically-loaded classes. More...
class  sdl::ConcreteClass< T >
 concrete implementation of the base meta-class. More...
struct  sdl::ConcreteClass< T >::MemberDescr
class  sdl::ConcreteClass< T >::ObjectProxy

Enumerations

enum  member_typeid_t {
  m_unknown_tid = 0, m_int_tid = 1, m_char_tid = 2, m_long_tid = 3,
  m_bool_tid = 4, m_double_tid = 5, m_float_tid = 6, m_string_tid = 7,
  m_c_string_tid = 8, m_char_p_tid = 9, m_c_char_p_tid = 10, m_void_p_tid = 11,
  mf_void_void_tid = 12, mf_void_int_tid = 13, mf_void_char_tid = 14, mf_void_long_tid = 15,
  mf_void_bool_tid = 16, mf_void_float_tid = 17, mf_void_double_tid = 18, mf_void_c_string_r_tid = 19,
  mf_void_c_char_p_tid = 20, mf_void_void_p_tid = 21
}

Functions

const char * type_declarator (unsigned int) throw ()
Classload_class (const string &classname, const string &libname) throw (Exception)
 loads a named class from the given library
void close_libraries ()
 closes all open libraries.


Detailed Description

name space for the Simple Dynamic Loader.

This namespace groups the types and functionalities assiciated with the Simple Dynamic Loader. These include:

  1. the load_class() function, is the primary access point to the dynamic loader.

  2. the Class class, which defines the interface to dynamically-loaded classes.

  3. the Object class, which defines the interface to the objects of a dynamically-loaded class.

  4. exceptions generated by the access functions.


Function Documentation

Class* load_class const string &  classname,
const string &  libname
throw (Exception)
 

loads a named class from the given library

Loads the given library and sets the necessary bindings for the given named class. This method relies on the systems' dynamic loader. In most systems, the dynamic loader uses an environment variable (usually LD_LIBRARY_PATH) to search for dynamic libraries. Unfortunately, different platforms have different dynamic loaders. Please, consult the documentation of your dynamic loader for more details (e.g., dlopen or ld.so).

Parameters:
classname name of the class to load
libname name of the shared-object library file
Exceptions:
Exception when the library can not be loaded or when the binding function can not be found in the library file.