| 
    TuttleOFX
    1
    
   
   | 
  
  
  
 
class representing a DLL/Shared Object/etc More...
#include <OfxhBinary.hpp>
Public Types | |
| typedef OfxhBinary | This | 
Public Member Functions | |
| OfxhBinary () | |
| void | init (const std::string &binaryPath) | 
| OfxhBinary (const std::string &binaryPath) | |
| ~OfxhBinary () | |
| bool | operator== (const This &other) const | 
| bool | operator!= (const This &other) const | 
| bool | isLoaded () const | 
| bool | isInvalid () const | 
| void | setInvalid (bool invalid) | 
| set invalid status (e.g. called by user if a mandatory symbol was missing)   | |
| time_t | getTime () const | 
| Last modification time of the file.   | |
| size_t | getSize () const | 
| Current size of the file.   | |
| const std::string & | getBinaryPath () const | 
| Path to the file.   | |
| void | ref () | 
| void | unref () | 
| void | load () | 
| open the binary.   | |
| void | unload () | 
| close the binary   | |
| void * | findSymbol (const std::string &symbol) | 
Protected Attributes | |
| std::string | _binaryPath | 
| bool | _invalid | 
| bool | _exists | 
| time_t | _time | 
| size_t | _size | 
| int | _users | 
Private Member Functions | |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int version) | 
Friends | |
| class | boost::serialization::access | 
class representing a DLL/Shared Object/etc
Definition at line 82 of file OfxhBinary.hpp.
Definition at line 85 of file OfxhBinary.hpp.
| tuttle::host::ofx::OfxhBinary::OfxhBinary | ( | ) | 
Definition at line 37 of file OfxhBinary.cpp.
| tuttle::host::ofx::OfxhBinary::OfxhBinary | ( | const std::string & | binaryPath | ) | 
create object representing the binary. will stat() it, and this fails, will set binary to be invalid.
Definition at line 47 of file OfxhBinary.cpp.
References init().

| tuttle::host::ofx::OfxhBinary::~OfxhBinary | ( | ) |  [inline] | 
        
Definition at line 111 of file OfxhBinary.hpp.
References unload().

| void * tuttle::host::ofx::OfxhBinary::findSymbol | ( | const std::string & | symbol | ) | 
look up a symbol in the binary file and return it as a pointer. returns null pointer if not found, or if the library is not loaded.
look up a symbol in the binary file and return it as a pointer. returns null pointer if not found.
Definition at line 137 of file OfxhBinary.cpp.
References _binaryPath, _invalid, and tuttle::quotes().
Referenced by tuttle::host::ofx::OfxhPluginBinary::loadPluginInfo(), and tuttle::host::ofx::OfxhPluginLoadGuard::OfxhPluginLoadGuard().

| const std::string& tuttle::host::ofx::OfxhBinary::getBinaryPath | ( | ) |  const [inline] | 
        
Path to the file.
Definition at line 142 of file OfxhBinary.hpp.
References _binaryPath.
Referenced by tuttle::host::ofx::OfxhPluginBinary::loadPluginInfo().
| size_t tuttle::host::ofx::OfxhBinary::getSize | ( | ) |  const [inline] | 
        
Current size of the file.
Definition at line 139 of file OfxhBinary.hpp.
References _size.
Referenced by tuttle::host::ofx::OfxhPluginBinary::checkBinaryChanged(), and tuttle::host::ofx::OfxhPluginBinary::loadPluginInfo().
| time_t tuttle::host::ofx::OfxhBinary::getTime | ( | ) |  const [inline] | 
        
Last modification time of the file.
Definition at line 136 of file OfxhBinary.hpp.
References _time.
Referenced by tuttle::host::ofx::OfxhPluginBinary::checkBinaryChanged(), and tuttle::host::ofx::OfxhPluginBinary::loadPluginInfo().
| void tuttle::host::ofx::OfxhBinary::init | ( | const std::string & | binaryPath | ) | 
Definition at line 59 of file OfxhBinary.cpp.
References _binaryPath, _invalid, _size, and _time.
Referenced by OfxhBinary(), serialize(), and tuttle::host::ofx::OfxhPluginBinary::serialize().
| bool tuttle::host::ofx::OfxhBinary::isInvalid | ( | ) |  const [inline] | 
        
is this binary invalid? (did the a stat() or load() on the file fail, or are we missing a some of the symbols?
Definition at line 130 of file OfxhBinary.hpp.
References _invalid.
| bool tuttle::host::ofx::OfxhBinary::isLoaded | ( | ) |  const [inline] | 
        
Definition at line 126 of file OfxhBinary.hpp.
Referenced by tuttle::host::ofx::OfxhPluginBinary::isLoaded().
| void tuttle::host::ofx::OfxhBinary::load | ( | ) | 
open the binary.
Definition at line 77 of file OfxhBinary.cpp.
References _binaryPath, _invalid, and tuttle::quotes().
Referenced by tuttle::host::ofx::OfxhPluginBinary::loadPluginInfo(), and ref().

| bool tuttle::host::ofx::OfxhBinary::operator!= | ( | const This & | other | ) |  const [inline] | 
        
Definition at line 124 of file OfxhBinary.hpp.
References operator==().

| bool tuttle::host::ofx::OfxhBinary::operator== | ( | const This & | other | ) |  const [inline] | 
        
Definition at line 113 of file OfxhBinary.hpp.
References _binaryPath, _exists, _invalid, _size, and _time.
Referenced by operator!=().
| void tuttle::host::ofx::OfxhBinary::ref | ( | ) | 
Definition at line 153 of file OfxhBinary.cpp.
References _users, and load().
Referenced by tuttle::host::ofx::OfxhPluginLoadGuard::OfxhPluginLoadGuard().

| void tuttle::host::ofx::OfxhBinary::serialize | ( | Archive & | ar, | 
| const unsigned int | version | ||
| ) |  [inline, private] | 
        
Definition at line 160 of file OfxhBinary.hpp.
References _binaryPath, _exists, _invalid, _size, _time, _users, and init().

| void tuttle::host::ofx::OfxhBinary::setInvalid | ( | bool | invalid | ) |  [inline] | 
        
set invalid status (e.g. called by user if a mandatory symbol was missing)
Definition at line 133 of file OfxhBinary.hpp.
References _invalid.
Referenced by tuttle::host::ofx::OfxhPluginBinary::loadPluginInfo().
| void tuttle::host::ofx::OfxhBinary::unload | ( | ) | 
close the binary
Definition at line 122 of file OfxhBinary.cpp.
Referenced by tuttle::host::ofx::OfxhPluginBinary::loadPluginInfo(), unref(), and ~OfxhBinary().
| void tuttle::host::ofx::OfxhBinary::unref | ( | ) | 
Definition at line 162 of file OfxhBinary.cpp.
References _users, and unload().
Referenced by tuttle::host::ofx::OfxhPluginLoadGuard::OfxhPluginLoadGuard(), and tuttle::host::ofx::OfxhPluginLoadGuard::~OfxhPluginLoadGuard().

friend class boost::serialization::access [friend] | 
        
Definition at line 158 of file OfxhBinary.hpp.
std::string tuttle::host::ofx::OfxhBinary::_binaryPath [protected] | 
        
destruction will close the library and invalidate any function pointers returned by lookupSymbol()
Definition at line 90 of file OfxhBinary.hpp.
Referenced by findSymbol(), getBinaryPath(), init(), load(), operator==(), and serialize().
bool tuttle::host::ofx::OfxhBinary::_exists [protected] | 
        
Definition at line 97 of file OfxhBinary.hpp.
Referenced by operator==(), and serialize().
bool tuttle::host::ofx::OfxhBinary::_invalid [protected] | 
        
Definition at line 91 of file OfxhBinary.hpp.
Referenced by findSymbol(), init(), isInvalid(), load(), operator==(), serialize(), and setInvalid().
size_t tuttle::host::ofx::OfxhBinary::_size [protected] | 
        
Definition at line 99 of file OfxhBinary.hpp.
Referenced by getSize(), init(), operator==(), and serialize().
time_t tuttle::host::ofx::OfxhBinary::_time [protected] | 
        
Definition at line 98 of file OfxhBinary.hpp.
Referenced by getTime(), init(), operator==(), and serialize().
int tuttle::host::ofx::OfxhBinary::_users [protected] | 
        
Definition at line 100 of file OfxhBinary.hpp.
Referenced by ref(), serialize(), and unref().