aboutsummaryrefslogtreecommitdiff
path: root/src/formatter.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-04-02 14:33:55 +0000
committerMike Buland <eichlan@xagasoft.com>2009-04-02 14:33:55 +0000
commite9e5da32b2e154698482b7ec6b7ab2098cd849c8 (patch)
tree1e9d2168a27b3979398285909dd10c362c03545a /src/formatter.h
parentb4ab27db8a97f0a56a61bd56480cfbe08a1f3399 (diff)
downloadlibbu++-e9e5da32b2e154698482b7ec6b7ab2098cd849c8.tar.gz
libbu++-e9e5da32b2e154698482b7ec6b7ab2098cd849c8.tar.bz2
libbu++-e9e5da32b2e154698482b7ec6b7ab2098cd849c8.tar.xz
libbu++-e9e5da32b2e154698482b7ec6b7ab2098cd849c8.zip
Removed some uses of printf in libbu++, I would like to get rid of all of them
some day, but I'm not in much of a rush, I just wanted to do a quick survey. Also added the Formatter::flush special stream value, so now you can do a: sio << "hello" << sio.flush; and it'll flush output immediately. I also tweaked a few things in the cachestore and cache so that they actually throw exceptions and the like instead of just printing out some garbage.
Diffstat (limited to '')
-rw-r--r--src/formatter.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/formatter.h b/src/formatter.h
index 5dd7622..30ecf42 100644
--- a/src/formatter.h
+++ b/src/formatter.h
@@ -179,9 +179,15 @@ namespace Bu
179 179
180 enum Special 180 enum Special
181 { 181 {
182 nl 182 nl,
183 flush
183 }; 184 };
184 185
186 void doFlush()
187 {
188 rOut.flush();
189 }
190
185 private: 191 private:
186 Stream &rOut; 192 Stream &rOut;
187 Fmt fLast; 193 Fmt fLast;