1 #ifndef STRING_TABLE_CLASS
2 #define STRING_TABLE_CLASS
46 virtual bool equal_to(
const equalizable &to_compare)
const {
48 if (!cast)
return false;
52 #define STRTAB_COMMENT_PREFIX "#comment#"
69 void add_spaces(
bool add_them) { _add_spaces = add_them; }
Provides a dynamically resizable ASCII character string.
Defines the base class for all string processing objects in hoople.
A very common template for a dynamic array of bytes.
the base class of the most easily used and tested objects in the library.
A base class for objects that can pack into an array of bytes.
Provides a symbol_table that holds strings as the content.
DEFINE_CLASS_NAME("string_table")
void add_spaces(bool add_them)
virtual bool equal_to(const equalizable &to_compare) const
virtual bool unpack(basis::byte_array &packed_form)
Restores the packable from the "packed_form".
basis::astring text_form() const
prints the contents of the table into the returned string.
bool operator==(const string_table &to_compare) const
string_table(int estimated_elements=100)
the "estimated_elements" specifies how many items to prepare to efficiently hold.
virtual void text_form(basis::base_string &fill) const
Provides a text view of all the important info owned by this object.
static bool is_comment(const basis::astring &to_check)
string_table & operator=(const string_table &to_copy)
virtual void pack(basis::byte_array &packed_form) const
Creates a packed form of the packable object in "packed_form".
virtual int packed_size() const
Estimates the space needed for the packed structure.
Maintains a list of names, where each name has a type and some contents.
int estimated_elements() const
returns the number of symbols the table is optimized for.
The guards collection helps in testing preconditions and reporting errors.
A dynamic container class that holds any kind of object via pointers.