module.cpp

00001 
00002 /***************************************************************************
00003  *  module.cpp - interface for modules (i.e. shared object, dynamic library)
00004  *
00005  *  Created: Wed May 09 11:03:40 2007
00006  *  Copyright  2006-2007  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023 
00024 #include <utils/system/dynamic_module/module.h>
00025 
00026 namespace fawkes {
00027 
00028 /** @class ModuleOpenException <utils/system/dynamic_module/module.h>
00029  * Opening a module failed.
00030  * Thrown if a call to Module::open() failed.
00031  */
00032 
00033 /** Constructor.
00034  * @param msg message
00035  */
00036 ModuleOpenException::ModuleOpenException(const char *msg)
00037   : Exception(msg)
00038 {
00039 }
00040 
00041 /** @class Module <utils/system/dynamic_module/module.h>
00042  * Interface representing a dynamically loaded software module
00043  * @author Tim Niemueller
00044  *
00045  * @fn void Module::open() = 0
00046  * Open the module
00047  * @exception ModuleOpenException thrown if there was any problem loading the module
00048  *
00049  * @fn bool Module::close() = 0
00050  * Close the module
00051  * @return Returns true if the module could be closed, false otherwise
00052  *
00053  *
00054  * @fn void Module::ref() = 0
00055  * Increment the reference count of this module
00056  *
00057  * @fn void Module::unref() = 0
00058  * Decrease the reference count of this module
00059  *
00060  * @fn bool Module::notref() = 0
00061  * Check if there are no reference to this module
00062  * @return Returns true if there are no references to this module,
00063  * false if there is at least one reference
00064  *
00065  * @fn unsigned int Module::get_ref_count() = 0
00066  * Get the reference count of this module
00067  * @return Returns the number of references to this module
00068  *
00069  * @fn bool Module::has_symbol(const char *symbol_name) = 0
00070  * Check if the module has the given symbol
00071  * @param symbol_name The name of the symbol.
00072  * @return Returns true if the symbol was found, false otherwise
00073  *
00074  * @fn void * Module::get_symbol(const char *symbol_name) = 0
00075  * Get a symbol from the module
00076  * @param symbol_name The name of the symbol.
00077  * @return Returns a pointer to the symbol or NULL if symbol was not found
00078  *
00079  * @fn std::string Module::get_filename() = 0
00080  * Get the full file name of the module
00081  * @return Returns a string with the full file name of the module
00082  *
00083  * @fn std::string Module::get_base_filename() = 0
00084  * Get the base file name of the module
00085  * @return Returns the base file name of the module. On Unix systems this is
00086  * everything after the last slash
00087  */
00088 
00089 /** Virtual empty destructor */
00090 Module::~Module()
00091 {
00092 }
00093 
00094 
00095 } // end namespace fawkes

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1