From bb5b04a5691af00c6b67d445f7dd807001745ec7 Mon Sep 17 00:00:00 2001 From: fred Date: Mon, 3 Mar 1997 17:24:36 +0000 Subject: [PATCH] flower-1.1.4 --- flower/dstream.hh | 9 +++++++-- flower/string-convert.hh | 41 ++++++++++++++++++++++++---------------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/flower/dstream.hh b/flower/dstream.hh index 801b166774..5375304d85 100644 --- a/flower/dstream.hh +++ b/flower/dstream.hh @@ -29,7 +29,7 @@ class Dstream int indentlvl; bool local_silence; String classname; - + void output(String s); Assoc *silent; public: @@ -42,8 +42,13 @@ public: Dstream(ostream *r, const char * rcfile); virtual ~Dstream(); Dstream &identify_as(String s); - + Dstream &operator << (String s); + /** + Output memory locations. + */ + Dstream &operator << (void const *); + Dstream &operator << (char const *); }; #endif diff --git a/flower/string-convert.hh b/flower/string-convert.hh index b96af44bd0..bcf461f8f3 100644 --- a/flower/string-convert.hh +++ b/flower/string-convert.hh @@ -7,28 +7,37 @@ #ifndef STRING_CONVERT_HH #define STRING_CONVERT_HH -/// -#define functor class // :-) +/* + ///a class which only has functions. +//#define functor class // cute. docxx fucks up +*/ + /** The functor String_convert handles all conversions to/from String (some time, anyway). The class is quite empty from data view. */ -functor String_convert { - static int hex2bin_i( String hex_str, String& bin_str_r ); - static int hex2nibble_i( Byte byte ); - static Byte nibble2hex_byte( Byte byte ); +class String_convert { + static int hex2bin_i( String hex_str, String& bin_str_r ); + static int hex2nibble_i( Byte byte ); + static Byte nibble2hex_byte( Byte byte ); public: - static String bin2dec_str( String dec_str ); - static String bin2hex_str( String bin_str ); - static String dec2bin_str( String str ); - static int bin2_i( String str ); - static int dec2_i( String dec_str ); - static double dec2_f( String dec_str ); - static int hex2int_i( String str ); - static String hex2bin_str( String str ); - static String i2hex_str( int i, int length_i, char ch ); - static String i2dec_str( int i, int length_i, char ch ); + static String bin2dec_str( String bin_str ); + static String bin2hex_str( String bin_str ); + static String dec2bin_str( String str ); + static int bin2_i( String str ); + static String char_str(char c, int n); + static int dec2_i( String dec_str ); + static double dec2_f( String dec_str ); + static String double_str(double f, char const* fmt=0); + static int hex2int_i( String str ); + static String hex2bin_str( String str ); + static String int_str(int i, char const *fmt=0 ); + static String i2hex_str( int i, int length_i, char ch ); + static String i2dec_str( int i, int length_i, char ch ); + static String rational_str(Rational); + static String pointer_str(const void *); + static String longlong_str(long long , char const * fmt = 0); }; #endif // __STRING_CONVERT_HH // -- 2.39.5