diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2012-03-25 20:00:08 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2012-03-25 20:00:08 +0000 |
| commit | 469bbcf0701e1eb8a6670c23145b0da87357e178 (patch) | |
| tree | b5b062a16e46a6c5d3410b4e574cd0cc09057211 /src/csvwriter.h | |
| parent | ee1b79396076edc4e30aefb285fada03bb45e80d (diff) | |
| download | libbu++-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/csvwriter.h')
| -rw-r--r-- | src/csvwriter.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/csvwriter.h b/src/csvwriter.h deleted file mode 100644 index 4291ed5..0000000 --- a/src/csvwriter.h +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 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_CSV_WRITER_H | ||
| 9 | #define BU_CSV_WRITER_H | ||
| 10 | |||
| 11 | #include "bu/string.h" | ||
| 12 | #include "bu/array.h" | ||
| 13 | #include "bu/signals.h" | ||
| 14 | |||
| 15 | namespace Bu | ||
| 16 | { | ||
| 17 | class Stream; | ||
| 18 | typedef Bu::Array<Bu::String> StrArray; | ||
| 19 | |||
| 20 | class CsvWriter | ||
| 21 | { | ||
| 22 | public: | ||
| 23 | typedef Bu::Signal1<Bu::String, const Bu::String &> EncodeSignal; | ||
| 24 | enum Style | ||
| 25 | { | ||
| 26 | styleExcel, ///< Excel style quotes around things that need em | ||
| 27 | styleC ///< Escape things that need it C-style | ||
| 28 | }; | ||
| 29 | |||
| 30 | CsvWriter( Stream &sOut, Style eStyle=styleExcel ); | ||
| 31 | CsvWriter( Stream &sOut, EncodeSignal sEncode ); | ||
| 32 | virtual ~CsvWriter(); | ||
| 33 | |||
| 34 | void writeLine( const StrArray &aStrs ); | ||
| 35 | |||
| 36 | private: | ||
| 37 | Stream &sOut; | ||
| 38 | EncodeSignal sEncode; | ||
| 39 | |||
| 40 | static Bu::String encodeExcel( const Bu::String &sIn ); | ||
| 41 | static Bu::String encodeC( const Bu::String &sIn ); | ||
| 42 | }; | ||
| 43 | }; | ||
| 44 | |||
| 45 | #endif | ||
