37 using std::ostringstream;
39 #include "BESCatalogEntry.h" 42 BESCatalogEntry::BESCatalogEntry(
const string &name,
const string &catalog) :
43 _name(name), _catalog(catalog)
47 BESCatalogEntry::~BESCatalogEntry()
50 map<string, BESCatalogEntry *>::iterator i = _entry_list.begin();
51 map<string, BESCatalogEntry *>::iterator e = _entry_list.end();
59 void BESCatalogEntry::set_size(off_t size)
75 strm << BESIndent::LMarg <<
"BESCatalogEntry::dump - (" << (
void *)
this <<
")" << endl;
78 strm << BESIndent::LMarg <<
"name: " << _name << endl;
79 strm << BESIndent::LMarg <<
"catalog: " << _catalog << endl;
80 strm << BESIndent::LMarg <<
"size: " << _size << endl;
81 strm << BESIndent::LMarg <<
"modification date: " << _mod_date << endl;
82 strm << BESIndent::LMarg <<
"modification time: " << _mod_time << endl;
83 strm << BESIndent::LMarg <<
"services: ";
84 if (_services.size()) {
87 list<string>::const_iterator si = _services.begin();
88 list<string>::const_iterator se = _services.end();
89 for (; si != se; si++) {
90 strm << BESIndent::LMarg << (*si) << endl;
92 BESIndent::UnIndent();
95 strm <<
"none" << endl;
98 strm << BESIndent::LMarg <<
"metadata: ";
99 if (_metadata.size()) {
102 map<string, string>::const_iterator mi = _metadata.begin();
103 map<string, string>::const_iterator me = _metadata.end();
104 for (; mi != me; mi++) {
105 strm << BESIndent::LMarg << (*mi).first <<
" = " << (*mi).second << endl;
107 BESIndent::UnIndent();
110 strm <<
"none" << endl;
113 strm << BESIndent::LMarg <<
"is collection? ";
114 if (_entry_list.size() > 0)
115 strm <<
"yes" << endl;
117 strm <<
"no" << endl;
118 strm << BESIndent::LMarg <<
"count: " << _entry_list.size() << endl;
122 map<string, BESCatalogEntry *>::const_iterator i = _entry_list.begin();
123 map<string, BESCatalogEntry *>::const_iterator e = _entry_list.end();
124 for (; i != e; i++) {
128 BESIndent::UnIndent();
130 BESIndent::UnIndent();
virtual void dump(ostream &strm) const
dumps information about this object