aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/newline.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
committerMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
commit469bbcf0701e1eb8a6670c23145b0da87357e178 (patch)
treeb5b062a16e46a6c5d3410b4e574cd0cc09057211 /src/unstable/newline.h
parentee1b79396076edc4e30aefb285fada03bb45e80d (diff)
downloadlibbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.gz
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.bz2
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.xz
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.zip
Code is all reorganized. We're about ready to release. I should write up a
little explenation of the arrangement.
Diffstat (limited to 'src/unstable/newline.h')
-rw-r--r--src/unstable/newline.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/unstable/newline.h b/src/unstable/newline.h
new file mode 100644
index 0000000..afe0a84
--- /dev/null
+++ b/src/unstable/newline.h
@@ -0,0 +1,41 @@
1/*
2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#ifndef BU_NEW_LINE_H
9#define BU_NEW_LINE_H
10
11#include "bu/filter.h"
12
13namespace Bu
14{
15 /**
16 * Converts new-line characters from any standard convention into linefeeds
17 * (\\n) on reading, and converts them to either your OS's standard or a
18 * specified standard, depending on how you construct the class.
19 *
20 * If you're reading in a text file, then this filter is practically
21 * required.
22 */
23 class NewLine : public Bu::Filter
24 {
25 public:
26 NewLine( Bu::Stream &rNext );
27 virtual ~NewLine();
28
29 virtual void start();
30 virtual Bu::size stop();
31
32 virtual Bu::size read( void *pBuf, Bu::size iAmnt );
33 virtual Bu::size write( const void *pBuf, Bu::size iAmnt );
34
35 private:
36 bool bExChar;
37 char cExChar;
38 };
39};
40
41#endif