libshevek
Public Member Functions | Static Public Member Functions | List of all members
shevek::dl Class Reference

Load symbols from dynamic libraries. More...

#include <dl.hh>

Inheritance diagram for shevek::dl:
shevek::refbase

Public Member Functions

 ~dl ()
 Close object and free structures.
void open (std::string const &file=std::string())
 Open a shared library.
void close ()
 Close the library, freeing the resources.
template<typename T >
T & get (std::string const &name)
 Get a symbol from the library.
- Public Member Functions inherited from shevek::refbase
template<typename _T >
Glib::RefPtr< _T > cast_dynamic ()
 Identical to GLib::RefPtr <>::cast_dynamic, but nicer to type.

Static Public Member Functions

static Glib::RefPtr< dlcreate ()
 Create a new dl object.

Additional Inherited Members

- Protected Member Functions inherited from shevek::refbase
 refbase ()
 Constructor, increments reference count.
virtual ~refbase ()
 Destructor, decrements reference count and destroys the object if it reaches 0.
template<typename T >
Glib::RefPtr< T > refptr_this ()
 Get a RefPtr to this, protected because only members should need it.

Detailed Description

Load symbols from dynamic libraries.

Usage: create, open, get, get, ..., close

Member Function Documentation

void shevek::dl::close ( )

Close the library, freeing the resources.

This is done automatically if open is called again, or the object is destroyed.

template<typename T >
T & shevek::dl::get ( std::string const &  name)

Get a symbol from the library.

Its type must be given by the caller and cannot be checked for correctness.


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