feisty meow concerns codebase
2.140
|
Defines the base class for all string processing objects in hoople. More...
#include <base_string.h>
Public Member Functions | |
virtual int | length () const =0 |
Returns the current length of the string. More... | |
virtual const char * | observe () const =0 |
observes the underlying pointer to the zero-terminated string. More... | |
virtual char * | access ()=0 |
provides access to the actual string held. More... | |
virtual char | get (int index) const =0 |
a constant peek at the string's internals at the specified index. More... | |
virtual void | put (int position, char to_put)=0 |
stores the character "to_put" at index "position" in the string. More... | |
virtual bool | sub_compare (const base_string &to_compare, int start_first, int start_second, int count, bool case_sensitive) const =0 |
Compares "this" string with "to_compare". More... | |
virtual base_string & | assign (const base_string &s)=0 |
Sets the contents of this string to "s". More... | |
virtual base_string & | upgrade (const char *s)=0 |
Sets the contents of this string to "s". More... | |
virtual void | insert (int position, const base_string &to_insert)=0 |
Copies "to_insert" into "this" at the "position". More... | |
virtual void | zap (int start, int end)=0 |
Deletes the characters between "start" and "end" inclusively. More... | |
virtual base_string & | concatenate_string (const base_string &s)=0 |
Modifies "this" by concatenating "s" onto it. More... | |
virtual base_string & | concatenate_char (char c)=0 |
concatenater for single characters. More... | |
virtual bool | sub_string (base_string &target, int start, int end) const =0 |
Gets the segment of "this" between the indices "start" and "end". More... | |
virtual base_string & | operator= (const base_string &to_copy) |
sets this string's contents equal to the contents of "to_copy". More... | |
Public Member Functions inherited from basis::orderable | |
virtual bool | less_than (const orderable &s2) const =0 |
virtual bool | operator< (const orderable &s2) const |
the virtual method for object ordering. More... | |
Public Member Functions inherited from basis::equalizable | |
virtual bool | equal_to (const equalizable &s2) const =0 |
virtual bool | operator== (const equalizable &s2) const |
the virtual method for object equality. More... | |
Defines the base class for all string processing objects in hoople.
Definition at line 27 of file base_string.h.
|
pure virtual |
provides access to the actual string held.
this should never return NULL_POINTER. be very careful with the returned pointer: don't destroy or corrupt its contents (e.g., do not mess with its zero termination).
Implemented in basis::astring.
|
pure virtual |
Sets the contents of this string to "s".
Implemented in basis::astring.
Referenced by operator=(), filesystem::file_time::readable_text_form(), basis::astring::text_form(), processes::OS_event::text_form(), octopi::identity_infoton::text_form(), octopi::unhandled_request::text_form(), octopi::encryption_infoton::text_form(), octopi::encryption_wrapper::text_form(), octopi::file_transfer_infoton::text_form(), octopi::security_infoton::text_form(), manifest_chunk::text_form(), timely::time_locus::text_form(), filesystem::file_time::text_form(), and octopi::octopus_entity::text_form().
|
pure virtual |
concatenater for single characters.
Implemented in basis::astring.
|
pure virtual |
Modifies "this" by concatenating "s" onto it.
Implemented in basis::astring.
|
pure virtual |
a constant peek at the string's internals at the specified index.
Implemented in basis::astring.
|
pure virtual |
Copies "to_insert" into "this" at the "position".
Characters at the index "position" and greater are moved over.
Implemented in basis::astring.
|
pure virtual |
Returns the current length of the string.
The length returned does not include the terminating null character at the end of the string.
Implemented in basis::astring.
Referenced by loggers::file_logger::log().
|
pure virtual |
observes the underlying pointer to the zero-terminated string.
this does not allow the contents to be modified. this method should never return NULL_POINTER.
Implemented in basis::astring.
Referenced by basis::astring::insert(), loggers::console_logger::log(), loggers::file_logger::log(), and basis::astring::sub_compare().
|
inlinevirtual |
sets this string's contents equal to the contents of "to_copy".
this assignment ensures that setting the base class to derived versions will succeed; otherwise, a base class copy does very little.
Definition at line 92 of file base_string.h.
References assign().
|
pure virtual |
stores the character "to_put" at index "position" in the string.
Implemented in basis::astring.
|
pure virtual |
Compares "this" string with "to_compare".
The "start_first" is where the comparison begins in "this" string, and "start_second" where it begins in the "to_compare". The "count" is the number of characters to compare between the two strings. If either index is out of range, or "count"-1 + either index is out of range, then compare returns false. If the strings differ in that range, false is returned. Only if the strings have identical contents in the range is true returned. If case-sensitive is false, then matches will not require the caps and lower-case match.
Implemented in basis::astring.
|
pure virtual |
Gets the segment of "this" between the indices "start" and "end".
false is returned if the range is invalid.
Implemented in basis::astring.
|
pure virtual |
Sets the contents of this string to "s".
Implemented in basis::astring.
|
pure virtual |
Deletes the characters between "start" and "end" inclusively.
C++ array conventions are used (0 through length()-1 are valid). If either index is out of bounds, then the string is not modified.
Implemented in basis::astring.