An array of strings with some additional helpful methods. More...
#include <string_array.h>


Public Member Functions | |
| string_array (int number=0, const basis::astring *initial_contents=NIL) | |
| Constructs an array of "number" strings. | |
| string_array (int number, const char *initial_contents[]) | |
| a constructor that operates on an array of char pointers. | |
| string_array (const basis::array< basis::astring > &to_copy) | |
| copy constructor that takes a templated array of astring. | |
| DEFINE_CLASS_NAME ("string_array") | |
| basis::astring | text_format (const basis::astring &separator=",", const basis::astring &delimiter="\"") const |
| Prints out a formatted view of the contained strings and returns it. | |
| basis::astring | text_form () const |
| A synonym for the text_format() method. | |
| bool | equal_to (const equalizable &to_compare) const |
| Compares this string array for equality with "to_compare". | |
| int | find (const basis::astring &to_find) const |
| locates string specified and returns its index, or negative if missing. | |
| bool | prefix_compare (const string_array &second) const |
| Returns true if all of the elements in this are the same in "second". | |
| virtual void | pack (basis::byte_array &packed_form) const |
| Packs this string array into the "packed_form" byte array. | |
| virtual bool | unpack (basis::byte_array &packed_form) |
| Unpacks a string array from the "packed_form" byte array. | |
| virtual int | packed_size () const |
| Returns the number of bytes this string array would consume if packed. | |
An array of strings with some additional helpful methods.
Definition at line 28 of file string_array.h.
| structures::string_array::string_array | ( | int | number = 0, |
|
| const basis::astring * | initial_contents = NIL | |||
| ) | [inline] |
Constructs an array of "number" strings.
creates a list of strings based on an initial "number" of entries and some "initial_contents", which should be a regular C array of astrings with at least as many entries as "number".
Definition at line 34 of file string_array.h.
| structures::string_array::string_array | ( | int | number, | |
| const char * | initial_contents[] | |||
| ) | [inline] |
a constructor that operates on an array of char pointers.
be very careful with the array to ensure that the right number of elements is provided.
Definition at line 44 of file string_array.h.
| structures::string_array::string_array | ( | const basis::array< basis::astring > & | to_copy | ) | [inline] |
copy constructor that takes a templated array of astring.
Definition at line 51 of file string_array.h.
| structures::string_array::DEFINE_CLASS_NAME | ( | "string_array" | ) |
| bool structures::string_array::equal_to | ( | const equalizable & | to_compare | ) | const [inline] |
Compares this string array for equality with "to_compare".
Definition at line 77 of file string_array.h.
| int structures::string_array::find | ( | const basis::astring & | to_find | ) | const [inline] |
locates string specified and returns its index, or negative if missing.
Definition at line 88 of file string_array.h.
Referenced by versions::version_ini::write_assembly().
| virtual void structures::string_array::pack | ( | basis::byte_array & | packed_form | ) | const [inline, virtual] |
Packs this string array into the "packed_form" byte array.
Implements basis::packable.
Definition at line 107 of file string_array.h.
Referenced by octopi::unhandled_request::pack(), structures::version::pack(), and octopi::file_transfer_infoton::package_tree_info().
| virtual int structures::string_array::packed_size | ( | ) | const [inline, virtual] |
Returns the number of bytes this string array would consume if packed.
Implements basis::packable.
Definition at line 115 of file string_array.h.
Referenced by octopi::infoton::fast_pack_overhead(), octopi::unhandled_request::packed_size(), and structures::version::packed_size().
| bool structures::string_array::prefix_compare | ( | const string_array & | second | ) | const [inline] |
Returns true if all of the elements in this are the same in "second".
The array "second" can have more elements, but must have all of the items listed in this string array.
Definition at line 98 of file string_array.h.
Referenced by octopi::octopus::evaluate(), and synchronic::list_synchronizer::update().
| basis::astring structures::string_array::text_form | ( | ) | const [inline] |
A synonym for the text_format() method.
Definition at line 71 of file string_array.h.
References text_format().
Referenced by octopi::octopus::add_tentacle(), sockets::tcpip_stack::enumerate_adapters(), octopi::octopus::evaluate(), octopi::tentacle::propel_arm(), and octopi::octopus::restore().
| basis::astring structures::string_array::text_format | ( | const basis::astring & | separator = ",", |
|
| const basis::astring & | delimiter = "\"" | |||
| ) | const [inline] |
Prints out a formatted view of the contained strings and returns it.
Definition at line 58 of file string_array.h.
Referenced by text_form().
| virtual bool structures::string_array::unpack | ( | basis::byte_array & | packed_form | ) | [inline, virtual] |
Unpacks a string array from the "packed_form" byte array.
Implements basis::packable.
Definition at line 111 of file string_array.h.
Referenced by octopi::unhandled_request::unpack(), and structures::version::unpack().
1.6.3