00001 #ifndef BYTE_FORMATTER_GROUP
00002 #define BYTE_FORMATTER_GROUP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "textual_dll.h"
00019
00020
00021 class byte_array;
00022 class istring;
00023
00025
00026 namespace byte_format {
00027
00028
00029
00030 void TEXTUAL_FUNCTION_STYLE print_char(byte to_print, istring &out,
00031 char replace = '_');
00033
00035 void TEXTUAL_FUNCTION_STYLE print_chars(const byte *to_print, int length,
00036 istring &out, char replace = '_');
00038
00039 void TEXTUAL_FUNCTION_STYLE text_dump(istring &output, const byte *location,
00040 u_int length, u_int label = 0, const char *eol = "\n");
00042
00048 istring TEXTUAL_FUNCTION_STYLE text_dump(const byte *location, u_int length,
00049 u_int label = 0, const char *eol = "\n");
00051
00053 void TEXTUAL_FUNCTION_STYLE text_dump(istring &output,
00054 const byte_array &to_dump, u_int label = 0, const char *eol = "\n");
00056 istring TEXTUAL_FUNCTION_STYLE text_dump(const byte_array &to_dump,
00057 u_int label = 0, const char *eol = "\n");
00059
00061 void TEXTUAL_FUNCTION_STYLE parse_dump(const istring &dumped_form,
00062 byte_array &bytes_found);
00063
00065
00066 void TEXTUAL_FUNCTION_STYLE bytes_to_string(const byte_array &to_convert,
00067 istring &as_string, bool space_delimited = true);
00069
00073 void TEXTUAL_FUNCTION_STYLE string_to_bytes(const istring &to_convert,
00074 byte_array &as_array);
00076
00082 void TEXTUAL_FUNCTION_STYLE bytes_to_string(const byte *to_convert, int length,
00083 istring &as_string, bool space_delimited = true);
00085
00086 void TEXTUAL_FUNCTION_STYLE string_to_bytes(const char *to_convert,
00087 byte_array &as_array);
00089
00091
00092 void TEXTUAL_FUNCTION_STYLE bytes_to_shifted_string
00093 (const byte_array &to_convert, istring &as_string);
00095
00101 void TEXTUAL_FUNCTION_STYLE shifted_string_to_bytes(const istring &to_convert,
00102 byte_array &as_array);
00104
00108 }
00109
00110 #endif
00111