27 #ifndef Hypertable_Lib_TableIdentifier_h
28 #define Hypertable_Lib_TableIdentifier_h
57 bool is_system()
const {
return !strncmp(
id,
"0/", 2); }
58 bool is_user()
const {
return strncmp(
id,
"0/", 2); }
62 const char *ptr =
id + strlen(
id);
63 while (ptr >
id && isdigit(*(ptr-1)))
93 size_t *remainp)
override;
124 void set_id(
const std::string &new_name) {
147 size_t *remainp)
override;
158 #endif // Hypertable_Lib_TableIdentifier_h
virtual ~TableIdentifierManaged()
static const char * METADATA_ID
const std::string & get_id() const
static const char * METADATA_NAME
size_t encoded_length_internal() const override
Returns internal serialized length.
void decode_internal(uint8_t version, const uint8_t **bufp, size_t *remainp) override
Reads serialized representation of object from a buffer.
TableIdentifierManaged(const TableIdentifier &identifier)
bool operator!=(const TableIdentifier &other) const
Wrapper for TableIdentifier providing member storage.
void encode_internal(uint8_t **bufp) const override
Writes serialized representation of object to a buffer.
TableIdentifierManaged(const TableIdentifierManaged &identifier)
std::ostream & operator<<(std::ostream &os, const crontab_entry &entry)
Helper function to write crontab_entry to an ostream.
TableIdentifierManaged & operator=(const TableIdentifier &identifier)
Declarations for Serializable.
void set_id(const char *new_name)
void set_id(const std::string &new_name)
virtual ~TableIdentifier()
Mixin class that provides a standard serialization interface.
static const int METADATA_ID_LENGTH
bool operator<(const TableIdentifier &other) const
uint8_t encoding_version() const override
Returns encoding version.
TableIdentifierManaged & operator=(const TableIdentifierManaged &other)
TableIdentifier(const char *s)
void decode_internal(uint8_t version, const uint8_t **bufp, size_t *remainp) override
Reads serialized representation of object from a buffer.
bool operator==(const TableIdentifier &other) const