33 #include "BESFileContainer.h" 34 #include "TheBESKeys.h" 37 #include "BESUncompressManager3.h" 38 #include "BESUncompressCache.h" 40 #include "BESForbiddenError.h" 50 BESFileContainer::BESFileContainer(
const string &sym_name,
const string &real_name,
const string &type) :
51 BESContainer(sym_name, real_name, type), _cached(false), _target(
"")
53 string::size_type dotdot = real_name.find(
"..");
54 if (dotdot != string::npos) {
55 string s = (string)
"'../' not allowed in container real name " + real_name;
65 BESContainer(copy_from), _cached(copy_from._cached), _target(copy_from._target)
92 BESDEBUG(
"cache2",
"Entering " << __PRETTY_FUNCTION__ <<
", real_name: " <<
get_real_name() << endl);
105 BESDEBUG(
"cache2",
"Cached as: " << _target << endl);
109 BESDEBUG(
"cache2",
"Not cached" << endl);
123 BESDEBUG(
"cache2",
"Entering " << __PRETTY_FUNCTION__ <<
", _cached: " << _cached <<
", _target: " << _target << endl);
139 strm << BESIndent::LMarg <<
"BESFileContainer::dump - (" << (
void *)
this <<
")" << endl;
142 BESIndent::UnIndent();
virtual string access()
returns the name of a file to access for this container, uncompressing if necessary.
virtual void dump(ostream &strm) const
dumps information about this object
Holds real data, container type and constraint for symbolic name read from persistence.
virtual bool uncompress(const string &src, string &target, BESFileLockingCache *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.
void _duplicate(BESContainer ©_to)
duplicate this instance into the passed container
static BESUncompressCache * get_instance()
error thrown if the BES is not allowed to access the resource requested
string get_real_name() const
retrieve the real name for this container, such as a file name.
A container is something that holds data. I.E. a netcdf file or a database entry. ...
virtual bool release()
release the file
virtual BESContainer * ptr_duplicate()
duplicate this instances of BESFileContainer
virtual void unlock_and_close(const string &target)