24#ifndef I_CatalogItem_h
25#define I_CatalogItem_h 1
40 Item_count (number of nodes or leaves it holds)
41 Items (zero or more Item instances)
74 enum item_type {unknown, node, leaf};
88 CatalogItem() : d_name(
""), d_size(0), d_lmt(
""), d_is_data(false), d_type(unknown) { }
104 CatalogItem(
const std::string &name,
size_t size,
const std::string &lmt, item_type type)
105 : d_name(name), d_size(size), d_lmt(lmt), d_is_data(false), d_type(type) { }
123 CatalogItem(
const std::string &name,
size_t size,
const std::string &lmt,
bool is_data, item_type type)
124 : d_name(name), d_size(size), d_lmt(lmt), d_is_data(
is_data), d_type(type) { }
145 void set_lmt(std::string lmt) { d_lmt = lmt; }
159 virtual void dump(std::ostream &strm)
const;
informational response object
top level BES object to house generic methods
void set_name(std::string n)
Set the name of the item.
std::string get_name() const
The name of this item in the node.
bool is_data() const
Is this item recognized as data?
void set_size(size_t s)
Set the size of the item.
void set_is_data(bool id)
Is this item data that the BES should interpret?
size_t get_size() const
The size (bytes) of the item.
void set_lmt(std::string lmt)
Set the LMT for this item.
CatalogItem(const std::string &name, size_t size, const std::string &lmt, item_type type)
Hold information about an item in a BES Catalog.
virtual void dump(std::ostream &strm) const
void encode_item(BESInfo *info)
Encode this CatalogItem in an info object.
std::string get_lmt() const
Get the last modified time for this item.
item_type get_type() const
Get the type of this item (unknown, node or leaf)
CatalogItem(const std::string &name, size_t size, const std::string &lmt, bool is_data, item_type type)
Hold information about an item in a BES Catalog.
void set_type(item_type t)
Set the type for this item.
CatalogItem()
Make an empty instance.