aboutsummaryrefslogtreecommitdiff
path: root/src/stable/sio.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/stable/sio.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/stable/sio.cpp b/src/stable/sio.cpp
index 6a650ed..1ea30c2 100644
--- a/src/stable/sio.cpp
+++ b/src/stable/sio.cpp
@@ -16,51 +16,51 @@ Bu::Formatter Bu::serr( Bu::serrRaw );
16 16
17namespace Bu 17namespace Bu
18{ 18{
19 class PrintEndAction : public Bu::String::FormatProxyEndAction 19 class PrintEndAction : public Bu::String::FormatProxyEndAction
20 { 20 {
21 public: 21 public:
22 PrintEndAction( Bu::Stream &s, bool bEndLn ) : 22 PrintEndAction( Bu::Stream &s, bool bEndLn ) :
23 s( s ), 23 s( s ),
24 bEndLn( bEndLn ) 24 bEndLn( bEndLn )
25 { 25 {
26 } 26 }
27 27
28 virtual ~PrintEndAction() 28 virtual ~PrintEndAction()
29 { 29 {
30 } 30 }
31 31
32 virtual void operator()( const Bu::String &sFinal ) 32 virtual void operator()( const Bu::String &sFinal )
33 { 33 {
34 s.write( sFinal.getStr(), sFinal.getSize() ); 34 s.write( sFinal.getStr(), sFinal.getSize() );
35 if( bEndLn ) 35 if( bEndLn )
36 { 36 {
37 s.write("\n", 1); 37 s.write("\n", 1);
38 s.flush(); 38 s.flush();
39 } 39 }
40 } 40 }
41 41
42 Bu::Stream &s; 42 Bu::Stream &s;
43 bool bEndLn; 43 bool bEndLn;
44 }; 44 };
45} 45}
46 46
47Bu::String::FormatProxy Bu::print( Bu::Stream &s, const Bu::String &str ) 47Bu::String::FormatProxy Bu::print( Bu::Stream &s, const Bu::String &str )
48{ 48{
49 return str.format( new Bu::PrintEndAction( s, false ) ); 49 return str.format( new Bu::PrintEndAction( s, false ) );
50} 50}
51 51
52Bu::String::FormatProxy Bu::print( const Bu::String &str ) 52Bu::String::FormatProxy Bu::print( const Bu::String &str )
53{ 53{
54 return print( sioRaw, str ); 54 return print( sioRaw, str );
55} 55}
56 56
57Bu::String::FormatProxy Bu::println( Bu::Stream &s, const Bu::String &str ) 57Bu::String::FormatProxy Bu::println( Bu::Stream &s, const Bu::String &str )
58{ 58{
59 return str.format( new Bu::PrintEndAction( s, true ) ); 59 return str.format( new Bu::PrintEndAction( s, true ) );
60} 60}
61 61
62Bu::String::FormatProxy Bu::println( const Bu::String &str ) 62Bu::String::FormatProxy Bu::println( const Bu::String &str )
63{ 63{
64 return println( sioRaw, str ); 64 return println( sioRaw, str );
65} 65}
66 66