Webmaster  |  Imprint 
C++ Server Pages
Main  |  License  |  Documentation  |  Download 

Library Class Reference

#include <cxxtools/dlloader.h>

List of all members.

Public Member Functions

 Library (const char *name)
 loads a shared library.
 Library ()
 default constructor.
 Library (const Library &src)
 Copy-constrcutor - increments reference to the library.
 ~Library ()
 unloads the library if some is referenced.
Libraryoperator= (const Library &src)
void open (const char *name)
void close ()
Symbol sym (const char *name) const
 extracts a symbol from the library.
void * operator[] (const char *name) const
 extracts a symbol from the library.
bool isLastRef () const
 returns true, if this is the only reference.
void * getHandle () const


Detailed Description

Library represents a shared-library.

To load a shared-library, just instantiate this class with a shared-library-name. The class is copyable. The library is unloaded (with dlclose) when the last reference is deleted.


Member Function Documentation

void open ( const char *  name  ) 

loads a shared library. If the class references already another library the reference is decremented and unloaded, if the class was the last reference.

void close (  ) 

unloads the library if some is referenced. Does nothing, if no library was referenced.

Copyright © 2008 The Tntnet Development Team
Tntnet 1.6