aboutsummaryrefslogtreecommitdiff
path: root/src/stable/csvwriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stable/csvwriter.h')
-rw-r--r--src/stable/csvwriter.h52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/stable/csvwriter.h b/src/stable/csvwriter.h
index bae1e1d..233f4ed 100644
--- a/src/stable/csvwriter.h
+++ b/src/stable/csvwriter.h
@@ -14,32 +14,32 @@
14 14
15namespace Bu 15namespace Bu
16{ 16{
17 class Stream; 17 class Stream;
18 typedef Bu::Array<Bu::String> StrArray; 18 typedef Bu::Array<Bu::String> StrArray;
19 19
20 class CsvWriter 20 class CsvWriter
21 { 21 {
22 public: 22 public:
23 typedef Bu::Signal1<Bu::String, const Bu::String &> EncodeSignal; 23 typedef Bu::Signal1<Bu::String, const Bu::String &> EncodeSignal;
24 enum Style 24 enum Style
25 { 25 {
26 styleExcel, ///< Excel style quotes around things that need em 26 styleExcel, ///< Excel style quotes around things that need em
27 styleC ///< Escape things that need it C-style 27 styleC ///< Escape things that need it C-style
28 }; 28 };
29 29
30 CsvWriter( Stream &sOut, Style eStyle=styleExcel ); 30 CsvWriter( Stream &sOut, Style eStyle=styleExcel );
31 CsvWriter( Stream &sOut, EncodeSignal sEncode ); 31 CsvWriter( Stream &sOut, EncodeSignal sEncode );
32 virtual ~CsvWriter(); 32 virtual ~CsvWriter();
33 33
34 void writeLine( const StrArray &aStrs ); 34 void writeLine( const StrArray &aStrs );
35 35
36 private: 36 private:
37 Stream &sOut; 37 Stream &sOut;
38 EncodeSignal sEncode; 38 EncodeSignal sEncode;
39 39
40 static Bu::String encodeExcel( const Bu::String &sIn ); 40 static Bu::String encodeExcel( const Bu::String &sIn );
41 static Bu::String encodeC( const Bu::String &sIn ); 41 static Bu::String encodeC( const Bu::String &sIn );
42 }; 42 };
43}; 43};
44 44
45#endif 45#endif