|
ltmm::backend< ThreadPolicy > Class Template Reference#include <ltmm/backend.hh>
Inheritance diagram for ltmm::backend< ThreadPolicy >: Detailed Descriptiontemplate<typename ThreadPolicy = single_thread>
Base class for backend loaders.
|
Public Types | |
typedef ThreadPolicy | thread_policy_type |
Public Member Functions | |
const std::string & | name () const |
const std::string & | prefix () const |
Protected Member Functions | |
backend (const std::string &name, const std::string &prefix) | |
virtual | ~backend () |
virtual void * | load (const std::string &f)=0 throw (backend_error) |
virtual bool | unload (void *m)=0 throw (backend_error) |
virtual void * | find_symbol (void *m, const std::string &s)=0 throw (backend_error) |
virtual bool | exit ()=0 throw (backend_error) |
Static Protected Member Functions | |
static lt_module | open (lt_user_data d, const char *f) throw () |
static int | close (lt_user_data d, lt_module m) throw () |
static lt_ptr | find_sym (lt_user_data d, lt_module m, const char *s) throw () |
static int | exit (lt_user_data d) throw () |
Protected Attributes | |
std::string | _name |
std::string | _prefix |
lt_dlloader * | _place |
Friends | |
class | loader< ThreadPolicy > |
|
The type of thread locks.
Definition at line 103 of file backend.hh. |
|
Constructor.
Definition at line 182 of file backend.hh. |
|
Destructor.
Definition at line 144 of file backend.hh. |
|
Friend to forward calls to open.
Definition at line 207 of file backend.hh. References ltmm::backend_error::cannot_close, ltmm::backend_error::id(), lt_dlseterror(), and ltmm::backend< ThreadPolicy >::unload(). Here is the call graph for this function: |
|
Call-back called when the backend is removed. The user cose should overload this to free any resources that the derived class may have.
Implemented in ltmm::internal_backend< ThreadPolicy >. |
|
Friend to forward calls to exit.
Definition at line 240 of file backend.hh. References ltmm::backend< ThreadPolicy >::exit(), ltmm::backend_error::id(), lt_dlseterror(), and ltmm::backend_error::remove_loader. Referenced by ltmm::backend< ThreadPolicy >::exit(). Here is the call graph for this function: |
|
Friend to forward calls to find_symbol.
Definition at line 223 of file backend.hh. References ltmm::backend< ThreadPolicy >::find_symbol(), ltmm::backend_error::id(), lt_dlseterror(), lt_ptr, and ltmm::backend_error::symbol_not_found. Here is the call graph for this function: |
|
Find a symbol in a library. The client code should overload this member function to find a symbol in the loaded library.
Implemented in ltmm::internal_backend< ThreadPolicy >. Referenced by ltmm::backend< ThreadPolicy >::find_sym(). |
|
Load a library. The client should overload this to open a dynamic loadable library.
Implemented in ltmm::internal_backend< ThreadPolicy >. Referenced by ltmm::backend< ThreadPolicy >::open(). |
|
Get the name.
Definition at line 176 of file backend.hh. Referenced by ltmm::loader< ThreadPolicy >::insert_backend(), and ltmm::loader< ThreadPolicy >::remove_backend(). |
|
Friend to forward calls to open.
Definition at line 191 of file backend.hh. References ltmm::backend_error::cannot_open, ltmm::backend_error::id(), ltmm::backend< ThreadPolicy >::load(), and lt_dlseterror(). Here is the call graph for this function: |
|
Get the prefix.
Definition at line 178 of file backend.hh. Referenced by ltmm::loader< ThreadPolicy >::insert_backend(). |
|
Unload a library. The client should overload this to close a dynamic loadable library.
Implemented in ltmm::internal_backend< ThreadPolicy >. Referenced by ltmm::backend< ThreadPolicy >::close(). |
|
Loader class needs to be a friend.
Reimplemented in ltmm::internal_backend< ThreadPolicy >. Definition at line 107 of file backend.hh. |
|
Name of this backend.
Definition at line 110 of file backend.hh. Referenced by ltmm::backend< thread_policy_type >::name(). |
|
Low-level pointer.
Definition at line 114 of file backend.hh. Referenced by ltmm::loader< ThreadPolicy >::insert_backend(), ltmm::internal_backend< ThreadPolicy >::internal_backend(), and ltmm::loader< ThreadPolicy >::next_backend(). |
|
Prefix for symbols.
Definition at line 112 of file backend.hh. Referenced by ltmm::backend< thread_policy_type >::prefix(). |