Classes | |
| class | set |
| Emulates a mathematical set, providing several standard set operations. More... | |
Functions | |
| template<class T1, class T2> | |
| bool | operator!= (const T1 &x, const T2 &y) |
| template<class T1, class T2> | |
| bool | operator> (const T1 &x, const T2 &y) |
| template<class T1, class T2> | |
| bool | operator<= (const T1 &x, const T2 &y) |
| template<class T1, class T2> | |
| bool | operator>= (const T1 &x, const T2 &y) |
| void | rotate_in (byte_array &attach_into, int to_attach, int size_in_bytes) |
| void | snag_out (byte_array &eat_from, u_int &accumulator, int size_in_bytes) |
| int | packed_size (byte_array &packed_form) |
| Reports the size required to pack a byte array into a byte array. | |
| void | attach (byte_array &packed_form, const byte_array &to_attach) |
| Packs a byte_array "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, byte_array &to_detach) |
| Unpacks a byte_array "to_detach" from "packed_form". | |
| void | attach (byte_array &packed_form, u_int to_attach) |
| Packs an unsigned integer "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, u_int &to_detach) |
| Unpacks an unsigned integer "to_attach" from "packed_form". | |
| void | attach (byte_array &packed_form, u_short to_attach) |
| Packs an unsigned short integer "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, u_short &to_detach) |
| Unpacks an unsigned short integer "to_attach" from "packed_form". | |
| void | attach (byte_array &packed_form, byte to_attach) |
| Packs a byte "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, byte &to_detach) |
| Unpacks a byte "to_detach" from "packed_form". | |
| void | attach (byte_array &packed_form, int to_attach) |
| Packs an integer "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, int &to_detach) |
| Unpacks an integer "to_attach" from "packed_form". | |
| void | attach (byte_array &packed_form, u_long to_attach) |
| Packs an unsigned long integer "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, u_long &to_detach) |
| Unpacks an unsigned long integer "to_attach" from "packed_form". | |
| void | attach (byte_array &packed_form, long to_attach) |
| Packs a long integer "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, long &to_detach) |
| Unpacks a long integer "to_attach" from "packed_form". | |
| void | attach (byte_array &packed_form, short to_attach) |
| Packs a short integer "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, short &to_detach) |
| Unpacks a short integer "to_attach" from "packed_form". | |
| void | attach (byte_array &packed_form, char to_attach) |
| Packs a char "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, char &to_detach) |
| Unpacks a char "to_detach" from "packed_form". | |
| void | attach (byte_array &packed_form, bool to_attach) |
| Packs a bool "to_attach" into "packed_form". | |
| void | attach (byte_array &packed_form, const char *to_attach) |
| Packs a character string "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, istring &to_detach) |
| Unpacks a character string "to_attach" from "packed_form". | |
| bool | detach (byte_array &packed_form, bool &to_detach) |
| Unpacks a bool "to_detach" from "packed_form". | |
| double | break_off_digit (double &input) |
| void | attach (byte_array &packed_form, double to_pack) |
| Packs a double precision floating point "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, double &to_unpack) |
| Unpacks a double precision floating point "to_attach" from "packed_form". | |
| void | attach (byte_array &packed_form, float to_pack) |
| Packs a floating point "to_attach" into "packed_form". | |
| bool | detach (byte_array &packed_form, float &to_unpack) |
| Unpacks a floating point "to_attach" from "packed_form". | |
| void | obscure_attach (byte_array &packed_form, int to_attach) |
| like the normal attach but shifts in some recognizable sentinel data. | |
| bool | obscure_detach (byte_array &packed_form, int &to_detach) |
| shifts the number back and checks validity, false returned if corrupted. | |
| template<class contents> | |
| void | pack (byte_array &packed_form, const array< contents > &to_pack) |
| provides a way to pack any array that stores packable objects. | |
| template<class contents> | |
| bool | unpack (byte_array &packed_form, array< contents > &to_unpack) |
| provides a way to unpack any array that stores packable objects. | |
| template<class contents> | |
| int | packed_size (const array< contents > &to_pack) |
| provides space estimation for the objects to be packed. | |
| template<class contents> | |
| void | pack_simple (byte_array &packed_form, const array< contents > &to_pack) |
| Packs flat objects into an array of bytes. | |
| template<class contents> | |
| bool | unpack_simple (byte_array &packed_form, array< contents > &to_unpack) |
| Unpacks flat objects from an array of bytes. | |
| template<class contents> | |
| void | pack (byte_array &packed_form, const basis::set< contents > &to_pack) |
| provides a way to pack any set that stores packable objects. | |
| template<class contents> | |
| bool | unpack (byte_array &packed_form, basis::set< contents > &to_unpack) |
| provides a way to unpack any set that stores packable objects. | |
| void basis::attach | ( | byte_array & | packed_form, | |
| float | to_pack | |||
| ) |
Packs a floating point "to_attach" into "packed_form".
Definition at line 261 of file packable.cpp.
References attach().
Referenced by cromp_name_array(), fake_pack(), example_rpc_client::get_some_points(), example_rpc_client::login(), example_rpc_client::logout(), pack(), file_transfer_infoton::pack(), file_transfer_header::pack(), directory_tree::pack(), octopus_request_id::pack(), octopus_entity::pack(), earth_time::time_locus::pack(), earth_time::day_in_year::pack(), earth_time::clock_time::pack(), serial_port_address::pack(), internet_address::pack(), network_address::pack(), event_record::pack(), and zing_table::pop_events().
| void basis::attach | ( | byte_array & | packed_form, | |
| double | to_pack | |||
| ) |
Packs a double precision floating point "to_attach" into "packed_form".
Definition at line 204 of file packable.cpp.
References attach(), and break_off_digit().
| void basis::attach | ( | byte_array & | packed_form, | |
| const char * | to_attach | |||
| ) |
Packs a character string "to_attach" into "packed_form".
Definition at line 146 of file packable.cpp.
References array< contents >::insert(), array< contents >::last(), memory_assign(), and array< contents >::observe().
| void basis::attach | ( | byte_array & | packed_form, | |
| bool | to_attach | |||
| ) |
Packs a bool "to_attach" into "packed_form".
Definition at line 143 of file packable.cpp.
References attach().
| void basis::attach | ( | byte_array & | packed_form, | |
| char | to_attach | |||
| ) |
Packs a char "to_attach" into "packed_form".
Definition at line 137 of file packable.cpp.
References attach().
| void basis::attach | ( | byte_array & | packed_form, | |
| short | to_attach | |||
| ) |
Packs a short integer "to_attach" into "packed_form".
Definition at line 131 of file packable.cpp.
References attach().
| void basis::attach | ( | byte_array & | packed_form, | |
| long | to_attach | |||
| ) |
Packs a long integer "to_attach" into "packed_form".
Definition at line 125 of file packable.cpp.
References attach().
| void basis::attach | ( | byte_array & | packed_form, | |
| u_long | to_attach | |||
| ) |
Packs an unsigned long integer "to_attach" into "packed_form".
Definition at line 119 of file packable.cpp.
References attach().
| void basis::attach | ( | byte_array & | packed_form, | |
| int | to_attach | |||
| ) |
Packs an integer "to_attach" into "packed_form".
This method and the other simple numerical storage methods use a little endian ordering of the bytes. They are platform independent with respect to endianness and will reassemble the number properly on any platform.
Definition at line 113 of file packable.cpp.
References attach().
| void basis::attach | ( | byte_array & | packed_form, | |
| byte | to_attach | |||
| ) |
| void basis::attach | ( | byte_array & | packed_form, | |
| u_short | to_attach | |||
| ) |
Packs an unsigned short integer "to_attach" into "packed_form".
Definition at line 88 of file packable.cpp.
References rotate_in().
| void basis::attach | ( | byte_array & | packed_form, | |
| u_int | to_attach | |||
| ) |
Packs an unsigned integer "to_attach" into "packed_form".
Definition at line 76 of file packable.cpp.
References rotate_in().
| void basis::attach | ( | byte_array & | packed_form, | |
| const byte_array & | to_attach | |||
| ) |
Packs a byte_array "to_attach" into "packed_form".
Definition at line 55 of file packable.cpp.
References array< contents >::length(), and obscure_attach().
Referenced by amorph_pack(), attach(), debugger::create_debug_message(), infoton::fast_pack(), internet_machine_uid::internet_machine_uid(), obscure_attach(), bubble::pack(), column_headers::pack(), security_infoton::pack(), encryption_wrapper::pack(), encryption_infoton::pack(), filename_tree::pack(), filename::pack(), file_info::pack(), geometric::point< numeric_type >::pack(), geometric::angle< contents >::pack(), string_table::pack(), data_structure::pack(), outcome::pack(), istring::pack(), machine_uid::pack(), manifest_chunk::pack(), attribute_bundle::pack_mod(), pack_simple(), RSA_crypto::private_key(), and RSA_crypto::public_key().
| double basis::break_off_digit | ( | double & | input | ) | [inline] |
| bool basis::detach | ( | byte_array & | packed_form, | |
| float & | to_unpack | |||
| ) |
Unpacks a floating point "to_attach" from "packed_form".
Definition at line 264 of file packable.cpp.
References detach().
Referenced by fake_amorph_unpack(), unpack(), file_transfer_infoton::unpack(), file_transfer_header::unpack(), directory_tree::unpack(), octopus_request_id::unpack(), octopus_entity::unpack(), earth_time::time_locus::unpack(), earth_time::day_in_year::unpack(), earth_time::clock_time::unpack(), serial_port_address::unpack(), internet_address::unpack(), network_address::unpack(), and event_record::unpack().
| bool basis::detach | ( | byte_array & | packed_form, | |
| double & | to_unpack | |||
| ) |
Unpacks a double precision floating point "to_attach" from "packed_form".
Definition at line 228 of file packable.cpp.
References detach(), array< contents >::last(), array< contents >::length(), and array< contents >::zap().
| bool basis::detach | ( | byte_array & | packed_form, | |
| bool & | to_detach | |||
| ) |
Unpacks a bool "to_detach" from "packed_form".
Definition at line 182 of file packable.cpp.
References detach().
| bool basis::detach | ( | byte_array & | packed_form, | |
| istring & | to_detach | |||
| ) |
Unpacks a character string "to_attach" from "packed_form".
Definition at line 155 of file packable.cpp.
References array< contents >::length(), array< contents >::observe(), istring::reset(), and array< contents >::zap().
| bool basis::detach | ( | byte_array & | packed_form, | |
| char & | to_detach | |||
| ) |
Unpacks a char "to_detach" from "packed_form".
Definition at line 140 of file packable.cpp.
References detach().
| bool basis::detach | ( | byte_array & | packed_form, | |
| short & | to_detach | |||
| ) |
Unpacks a short integer "to_attach" from "packed_form".
Definition at line 134 of file packable.cpp.
References detach().
| bool basis::detach | ( | byte_array & | packed_form, | |
| long & | to_detach | |||
| ) |
Unpacks a long integer "to_attach" from "packed_form".
Definition at line 128 of file packable.cpp.
References detach().
| bool basis::detach | ( | byte_array & | packed_form, | |
| u_long & | to_detach | |||
| ) |
Unpacks an unsigned long integer "to_attach" from "packed_form".
Definition at line 122 of file packable.cpp.
References detach().
| bool basis::detach | ( | byte_array & | packed_form, | |
| int & | to_detach | |||
| ) |
Unpacks an integer "to_attach" from "packed_form".
Definition at line 116 of file packable.cpp.
References detach().
| bool basis::detach | ( | byte_array & | packed_form, | |
| byte & | to_detach | |||
| ) |
Unpacks a byte "to_detach" from "packed_form".
Definition at line 103 of file packable.cpp.
References array< contents >::length(), and array< contents >::zap().
| bool basis::detach | ( | byte_array & | packed_form, | |
| u_short & | to_detach | |||
| ) |
Unpacks an unsigned short integer "to_attach" from "packed_form".
Definition at line 91 of file packable.cpp.
References array< contents >::length(), and snag_out().
| bool basis::detach | ( | byte_array & | packed_form, | |
| u_int & | to_detach | |||
| ) |
Unpacks an unsigned integer "to_attach" from "packed_form".
Definition at line 79 of file packable.cpp.
References array< contents >::length(), and snag_out().
| bool basis::detach | ( | byte_array & | packed_form, | |
| byte_array & | to_detach | |||
| ) |
Unpacks a byte_array "to_detach" from "packed_form".
Definition at line 61 of file packable.cpp.
References array< contents >::length(), obscure_detach(), array< contents >::subarray(), and array< contents >::zap().
Referenced by amorph_unpack(), debugger::crack_debug_message(), detach(), infoton::fast_unpack(), obscure_detach(), manifest_chunk::read_an_int(), RSA_crypto::set_key(), infoton::test_fast_unpack(), bubble::unpack(), column_headers::unpack(), security_infoton::unpack(), encryption_wrapper::unpack(), encryption_infoton::unpack(), filename_tree::unpack(), filename::unpack(), file_info::unpack(), geometric::point< numeric_type >::unpack(), geometric::angle< contents >::unpack(), string_table::unpack(), data_structure::unpack(), outcome::unpack(), istring::unpack(), machine_uid::unpack(), manifest_chunk::unpack(), attribute_bundle::unpack_mod(), and unpack_simple().
| void basis::obscure_attach | ( | byte_array & | packed_form, | |
| int | to_attach | |||
| ) |
like the normal attach but shifts in some recognizable sentinel data.
this is slightly more sure than a simple integer attachment. it can be used to make sure upcoming data is probably a valid int.
Definition at line 274 of file packable.cpp.
References attach().
Referenced by attach(), pack(), manifest_chunk::pack(), and pack_simple().
| bool basis::obscure_detach | ( | byte_array & | packed_form, | |
| int & | to_detach | |||
| ) |
shifts the number back and checks validity, false returned if corrupted.
Definition at line 289 of file packable.cpp.
References detach().
Referenced by detach(), manifest_chunk::read_an_obscured_int(), infoton::test_fast_unpack(), unpack(), manifest_chunk::unpack(), and unpack_simple().
| bool basis::operator!= | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
Definition at line 52 of file function.h.
| bool basis::operator<= | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
Definition at line 56 of file function.h.
| bool basis::operator> | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
Definition at line 54 of file function.h.
| bool basis::operator>= | ( | const T1 & | x, | |
| const T2 & | y | |||
| ) | [inline] |
Definition at line 58 of file function.h.
| void basis::pack | ( | byte_array & | packed_form, | |
| const basis::set< contents > & | to_pack | |||
| ) |
provides a way to pack any set that stores packable objects.
Definition at line 125 of file set.h.
References basis::set< contents >::elements(), obscure_attach(), and pack().
| void basis::pack | ( | byte_array & | packed_form, | |
| const array< contents > & | to_pack | |||
| ) |
provides a way to pack any array that stores packable objects.
Definition at line 140 of file packable.h.
References array< contents >::length(), and obscure_attach().
Referenced by infoton::fast_pack(), runtime_history::pack(), string_set::pack(), pack(), and run_test_36().
| void basis::pack_simple | ( | byte_array & | packed_form, | |
| const array< contents > & | to_pack | |||
| ) |
Packs flat objects into an array of bytes.
Similar to pack above, but operates on arrays with simple objects that do not support functional pack and unpack.
Definition at line 179 of file packable.h.
References attach(), array< contents >::length(), and obscure_attach().
Referenced by event_record::pack().
| int basis::packed_size | ( | const array< contents > & | to_pack | ) |
provides space estimation for the objects to be packed.
Definition at line 167 of file packable.h.
References array< contents >::length(), and packed_size().
| int basis::packed_size | ( | byte_array & | packed_form | ) |
Reports the size required to pack a byte array into a byte array.
Definition at line 52 of file packable.cpp.
References array< contents >::length().
Referenced by packed_size().
| void basis::rotate_in | ( | byte_array & | attach_into, | |
| int | to_attach, | |||
| int | size_in_bytes | |||
| ) |
| void basis::snag_out | ( | byte_array & | eat_from, | |
| u_int & | accumulator, | |||
| int | size_in_bytes | |||
| ) |
Definition at line 40 of file packable.cpp.
References array< contents >::zap().
Referenced by detach().
| bool basis::unpack | ( | byte_array & | packed_form, | |
| basis::set< contents > & | to_unpack | |||
| ) |
provides a way to unpack any set that stores packable objects.
Definition at line 133 of file set.h.
References basis::set< contents >::add(), basis::set< contents >::clear(), and obscure_detach().
| bool basis::unpack | ( | byte_array & | packed_form, | |
| array< contents > & | to_unpack | |||
| ) |
provides a way to unpack any array that stores packable objects.
Definition at line 148 of file packable.h.
References array< contents >::flags(), NIL, obscure_detach(), and array< contents >::reset().
Referenced by infoton::fast_unpack(), run_test_36(), runtime_history::unpack(), and string_set::unpack().
| bool basis::unpack_simple | ( | byte_array & | packed_form, | |
| array< contents > & | to_unpack | |||
| ) |
Unpacks flat objects from an array of bytes.
Similar to unpack above, but operates on arrays with simple objects that do not support functional pack and unpack.
Definition at line 190 of file packable.h.
References detach(), array< contents >::flags(), NIL, obscure_detach(), and array< contents >::reset().
Referenced by event_record::unpack().
1.5.1