#include <BESUncompressManager.h>
Inheritance diagram for BESUncompressManager:
Public Member Functions | |
virtual | ~BESUncompressManager (void) |
virtual bool | add_method (const string &name, p_bes_uncompress method) |
add a uncompress method to the list | |
virtual bool | remove_method (const string &name) |
removes a uncompress method from the list | |
virtual p_bes_uncompress | find_method (const string &name) |
returns the uncompression method specified | |
virtual string | get_method_names () |
returns the comma separated list of all uncompression methods currently registered. | |
virtual string | uncompress (const string &src, BESCache &cache) |
find the method that can uncompress the specified src and pass control to that method. | |
virtual void | dump (ostream &strm) const |
dumps information about this object | |
Static Public Member Functions | |
static BESUncompressManager * | TheManager () |
Protected Member Functions | |
BESUncompressManager (void) | |
constructs an uncompression manager adding gz and bz2 uncompression methods by default. |
The BESUncompressManager allows the developer to add or remove named uncompression methods from the list for this server. By default a gz and bz2 method is provided.
What is actually added to the list are static uncompression functions
Definition at line 60 of file BESUncompressManager.h.
BESUncompressManager::BESUncompressManager | ( | void | ) | [protected] |
constructs an uncompression manager adding gz and bz2 uncompression methods by default.
Definition at line 51 of file BESUncompressManager.cc.
References add_method(), BESKeys::get_key(), TheBESKeys::TheKeys(), BESUncompressBZ2::uncompress(), and BESUncompressGZ::uncompress().
Here is the call graph for this function:
virtual BESUncompressManager::~BESUncompressManager | ( | void | ) | [inline, virtual] |
Definition at line 73 of file BESUncompressManager.h.
bool BESUncompressManager::add_method | ( | const string & | name, | |
p_bes_uncompress | method | |||
) | [virtual] |
add a uncompress method to the list
This method actually adds to the list a static method that knows how to uncompress a particular type of file. For example, a .gz or .bz2 file.
name | name of the method to add to the list | |
method | the static function that uncompress the particular type of file |
Definition at line 94 of file BESUncompressManager.cc.
Referenced by BESUncompressManager().
bool BESUncompressManager::remove_method | ( | const string & | name | ) | [virtual] |
removes a uncompress method from the list
The static method that knows how to uncompress the specified type of file is removed from the list.
name | name of the method to remove |
Definition at line 116 of file BESUncompressManager.cc.
p_bes_uncompress BESUncompressManager::find_method | ( | const string & | name | ) | [virtual] |
returns the uncompression method specified
This method looks up the uncompression method with the given name and returns that method.
name | name of the uncompression method to find |
Definition at line 137 of file BESUncompressManager.cc.
Referenced by uncompress().
string BESUncompressManager::get_method_names | ( | ) | [virtual] |
returns the comma separated list of all uncompression methods currently registered.
Definition at line 154 of file BESUncompressManager.cc.
string BESUncompressManager::uncompress | ( | const string & | src, | |
BESCache & | cache | |||
) | [virtual] |
find the method that can uncompress the specified src and pass control to that method.
src | file to be uncompressed | |
cache | BESCache object to uncompress the src file in |
Definition at line 177 of file BESUncompressManager.cc.
References BESDEBUG, BESCache::cache_dir(), find_method(), BESCache::is_cached(), BESCache::lock(), BESCache::purge(), and BESCache::unlock().
Referenced by BESContainer::access(), and uncompressT::run().
Here is the call graph for this function:
void BESUncompressManager::dump | ( | ostream & | strm | ) | const [virtual] |
dumps information about this object
Displays the pointer value of this instance along with the names of the registered uncompression methods.
strm | C++ i/o stream to dump the information to |
Implements BESObj.
Definition at line 286 of file BESUncompressManager.cc.
References BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
Here is the call graph for this function:
BESUncompressManager * BESUncompressManager::TheManager | ( | ) | [static] |
Definition at line 311 of file BESUncompressManager.cc.
Referenced by BESContainer::access(), and uncompressT::run().