45 #include "BESUncompressManager.h"
56 BESFileContainer::BESFileContainer(
const string &sym_name,
const string &real_name,
const string &type) :
59 string::size_type dotdot = real_name.find(
"..");
60 if (dotdot != string::npos) {
61 string s = (string)
"'../' not allowed in container real name " + real_name;
102 (
string)
"BES.CachePrefix", (
string)
"BES.CacheSize");
120 BESCache cache( *keys,
"BES.CacheDir",
"BES.CachePrefix",
"BES.CacheSize" );
122 _cached = BESUncompressManager::TheManager()->uncompress(
get_real_name(), _target, cache );
155 strm <<
BESIndent::LMarg <<
"BESFileContainer::dump - (" << (
void *)
this <<
")" << endl;
virtual string access()
returns the name of a file to access for this container, uncompressing if necessary.
Holds real data, container type and constraint for symbolic name read from persistence.
virtual void unlock_and_close(const string &target)
Unlock the named file.
static BESUncompressManager3 * TheManager()
mapping of key/value pairs defining different behaviors of an application.
Implementation of a caching mechanism for compressed data.
static ostream & LMarg(ostream &strm)
string get_real_name() const
retrieve the real name for this container, such as a file name.
virtual void _duplicate(BESContainer ©_to)
void _duplicate(BESContainer ©_to)
duplicate this instance into the passed container
error thrown if the BES is not allowed to access the resource requested
virtual bool uncompress(const string &src, string &target, BESCache3 *cache)
If the file 'src' should be uncompressed, do so and return a new file name on the value-result param ...
virtual void dump(ostream &strm) const
Displays debug information about this object.
virtual void dump(ostream &strm) const
dumps information about this object
A container is something that holds data.
virtual bool release()
release the file
static BESKeys * TheKeys()
virtual BESContainer * ptr_duplicate()
duplicate this instances of BESFileContainer
static BESCache3 * get_instance()
Get an instance of the BESCache3 object.