TuttleOFX  1
tuttle::host::ofx::OfxhPluginBinary Class Reference

#include <OfxhPluginBinary.hpp>

Collaboration diagram for tuttle::host::ofx::OfxhPluginBinary:

Public Types

typedef OfxhPluginBinary This
typedef boost::ptr_vector
< OfxhPlugin
PluginVector

Public Member Functions

 OfxhPluginBinary (const std::string &file, const std::string &bundlePath, time_t mtime, size_t size)
 OfxhPluginBinary (const std::string &file, const std::string &bundlePath, OfxhPluginCache *cache)
virtual ~OfxhPluginBinary ()
 dtor
bool operator== (const This &other) const
bool operator!= (const This &other) const
time_t getFileModificationTime () const
size_t getFileSize () const
const std::string & getFilePath () const
const std::string & getBundlePath () const
const std::string getResourcesPath () const
bool hasBinaryChanged () const
bool isLoaded () const
void addPlugin (OfxhPlugin *pe)
void loadPluginInfo (OfxhPluginCache *)
 try to open the plugin bundle object and query it for plugins
int getNPlugins () const
 how many plugins?
PluginVectorgetPlugins ()
 get plugins
const PluginVectorgetPlugins () const
 get plugins
OfxhPlugingetPlugin (int idx)
 get a plugin
const OfxhPlugingetPlugin (int idx) const
 get a plugin

Protected Attributes

OfxhBinary _binary
 our binary object, abstracted layer ontop of OS calls, defined in OfxhBinary.hpp
std::string _filePath
 full path to the file
std::string _bundlePath
 path to the .bundle directory
PluginVector _plugins
 my plugins
time_t _fileModificationTime
 used as a time stamp to check modification times, used for caching
size_t _fileSize
 file size last time we check, used for caching
bool _binaryChanged
 whether the timestamp/filesize in this cache is different from that in the actual binary

Private Member Functions

 OfxhPluginBinary ()
void checkBinaryChanged ()
template<class Archive >
void serialize (Archive &ar, const unsigned int version)

Friends

class OfxhPluginLoadGuard
class boost::serialization::access

Detailed Description

class that represents a binary file which holds plugins. Has a set of plugins inside it and which it owns These are owned by a PluginCache

Definition at line 23 of file OfxhPluginBinary.hpp.


Member Typedef Documentation

Definition at line 27 of file OfxhPluginBinary.hpp.


Constructor & Destructor Documentation

tuttle::host::ofx::OfxhPluginBinary::OfxhPluginBinary ( ) [inline, explicit, private]

Definition at line 41 of file OfxhPluginBinary.hpp.

tuttle::host::ofx::OfxhPluginBinary::OfxhPluginBinary ( const std::string &  file,
const std::string &  bundlePath,
time_t  mtime,
size_t  size 
) [inline, explicit]

create one from the cache. this will invoke the Binary() constructor which will stat() the file.

Definition at line 51 of file OfxhPluginBinary.hpp.

References checkBinaryChanged().

Here is the call graph for this function:

tuttle::host::ofx::OfxhPluginBinary::OfxhPluginBinary ( const std::string &  file,
const std::string &  bundlePath,
OfxhPluginCache cache 
) [inline, explicit]

constructor which will open a library file, call things inside it, and then create Plugin objects as appropriate for the plugins exported therefrom

Definition at line 65 of file OfxhPluginBinary.hpp.

References loadPluginInfo().

Here is the call graph for this function:

tuttle::host::ofx::OfxhPluginBinary::~OfxhPluginBinary ( ) [virtual]

dtor

Definition at line 60 of file OfxhPluginBinary.cpp.


Member Function Documentation

void tuttle::host::ofx::OfxhPluginBinary::addPlugin ( OfxhPlugin pe) [inline]

Definition at line 138 of file OfxhPluginBinary.hpp.

References _plugins.

void tuttle::host::ofx::OfxhPluginBinary::checkBinaryChanged ( ) [inline, private]

Definition at line 78 of file OfxhPluginBinary.hpp.

References _binary, _binaryChanged, _fileModificationTime, _fileSize, tuttle::host::ofx::OfxhBinary::getSize(), and tuttle::host::ofx::OfxhBinary::getTime().

Referenced by OfxhPluginBinary(), and serialize().

Here is the call graph for this function:

const std::string& tuttle::host::ofx::OfxhPluginBinary::getBundlePath ( ) const [inline]
time_t tuttle::host::ofx::OfxhPluginBinary::getFileModificationTime ( ) const [inline]

Definition at line 102 of file OfxhPluginBinary.hpp.

References _fileModificationTime.

const std::string& tuttle::host::ofx::OfxhPluginBinary::getFilePath ( ) const [inline]
size_t tuttle::host::ofx::OfxhPluginBinary::getFileSize ( ) const [inline]

Definition at line 107 of file OfxhPluginBinary.hpp.

References _fileSize.

int tuttle::host::ofx::OfxhPluginBinary::getNPlugins ( ) const [inline]

how many plugins?

Definition at line 146 of file OfxhPluginBinary.hpp.

References _plugins.

Referenced by tuttle::host::ofx::OfxhPluginCache::scanDirectory().

OfxhPlugin& tuttle::host::ofx::OfxhPluginBinary::getPlugin ( int  idx) [inline]

get a plugin

Definition at line 164 of file OfxhPluginBinary.hpp.

References _plugins.

Referenced by tuttle::host::ofx::OfxhPluginCache::scanDirectory().

const OfxhPlugin& tuttle::host::ofx::OfxhPluginBinary::getPlugin ( int  idx) const [inline]

get a plugin

Definition at line 170 of file OfxhPluginBinary.hpp.

References _plugins.

PluginVector& tuttle::host::ofx::OfxhPluginBinary::getPlugins ( ) [inline]

get plugins

Definition at line 152 of file OfxhPluginBinary.hpp.

References _plugins.

Referenced by serialize(), and tuttle::host::ofx::OfxhPluginCache::serialize().

const PluginVector& tuttle::host::ofx::OfxhPluginBinary::getPlugins ( ) const [inline]

get plugins

Definition at line 158 of file OfxhPluginBinary.hpp.

References _plugins.

const std::string tuttle::host::ofx::OfxhPluginBinary::getResourcesPath ( ) const [inline]

Definition at line 122 of file OfxhPluginBinary.hpp.

References _bundlePath.

bool tuttle::host::ofx::OfxhPluginBinary::hasBinaryChanged ( ) const [inline]

Definition at line 127 of file OfxhPluginBinary.hpp.

References _binaryChanged.

bool tuttle::host::ofx::OfxhPluginBinary::isLoaded ( ) const [inline]

Definition at line 132 of file OfxhPluginBinary.hpp.

References _binary, and tuttle::host::ofx::OfxhBinary::isLoaded().

Here is the call graph for this function:

bool tuttle::host::ofx::OfxhPluginBinary::operator!= ( const This other) const [inline]

Definition at line 100 of file OfxhPluginBinary.hpp.

References operator==().

Here is the call graph for this function:

bool tuttle::host::ofx::OfxhPluginBinary::operator== ( const This other) const [inline]

Definition at line 87 of file OfxhPluginBinary.hpp.

References _binary, _binaryChanged, _bundlePath, _fileModificationTime, _filePath, _fileSize, and _plugins.

Referenced by operator!=().

template<class Archive >
void tuttle::host::ofx::OfxhPluginBinary::serialize ( Archive &  ar,
const unsigned int  version 
) [inline, private]

Definition at line 178 of file OfxhPluginBinary.hpp.

References _binary, _bundlePath, _fileModificationTime, _filePath, _fileSize, _plugins, checkBinaryChanged(), getPlugins(), and tuttle::host::ofx::OfxhBinary::init().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Definition at line 176 of file OfxhPluginBinary.hpp.

friend class OfxhPluginLoadGuard [friend]

Definition at line 29 of file OfxhPluginBinary.hpp.


Field Documentation

whether the timestamp/filesize in this cache is different from that in the actual binary

Definition at line 38 of file OfxhPluginBinary.hpp.

Referenced by checkBinaryChanged(), hasBinaryChanged(), loadPluginInfo(), and operator==().

path to the .bundle directory

Definition at line 34 of file OfxhPluginBinary.hpp.

Referenced by getBundlePath(), getResourcesPath(), operator==(), and serialize().

used as a time stamp to check modification times, used for caching

Definition at line 36 of file OfxhPluginBinary.hpp.

Referenced by checkBinaryChanged(), getFileModificationTime(), loadPluginInfo(), operator==(), and serialize().

full path to the file

Definition at line 33 of file OfxhPluginBinary.hpp.

Referenced by getFilePath(), operator==(), and serialize().

file size last time we check, used for caching

Definition at line 37 of file OfxhPluginBinary.hpp.

Referenced by checkBinaryChanged(), getFileSize(), loadPluginInfo(), operator==(), and serialize().


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