diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2009-03-16 07:54:47 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2009-03-16 07:54:47 +0000 |
| commit | 94fff060ee9ec6c2a8da75568702d8e944963d46 (patch) | |
| tree | ca1180937070a61f82f3b63406d3b229b162f48a /src/formatter.h | |
| parent | 7433ec9074051ea5d9f91458e2e91e29ec8020f2 (diff) | |
| download | libbu++-94fff060ee9ec6c2a8da75568702d8e944963d46.tar.gz libbu++-94fff060ee9ec6c2a8da75568702d8e944963d46.tar.bz2 libbu++-94fff060ee9ec6c2a8da75568702d8e944963d46.tar.xz libbu++-94fff060ee9ec6c2a8da75568702d8e944963d46.zip | |
Added some experimental indenting code to the formatter, not sure I quite dig
it yet, I'd recommend not using it much for now, the API could change
drastically.
Diffstat (limited to '')
| -rw-r--r-- | src/formatter.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/formatter.h b/src/formatter.h index d9066cb..693c3ed 100644 --- a/src/formatter.h +++ b/src/formatter.h | |||
| @@ -87,6 +87,14 @@ namespace Bu | |||
| 87 | void writeAligned( const Bu::FString &sStr ); | 87 | void writeAligned( const Bu::FString &sStr ); |
| 88 | void writeAligned( const char *sStr, int iLen ); | 88 | void writeAligned( const char *sStr, int iLen ); |
| 89 | 89 | ||
| 90 | void incIndent(); | ||
| 91 | void decIndent(); | ||
| 92 | void setIndent( uint8_t uLevel ); | ||
| 93 | void clearIndent(); | ||
| 94 | uint8_t getIndent() const { return uIndent; } | ||
| 95 | void setIndentChar( char cIndent ); | ||
| 96 | char getIndentChar() const { return cIndent; } | ||
| 97 | |||
| 90 | void setFormat( const Fmt &f ) | 98 | void setFormat( const Fmt &f ) |
| 91 | { | 99 | { |
| 92 | fLast = f; | 100 | fLast = f; |
| @@ -178,6 +186,8 @@ namespace Bu | |||
| 178 | Stream &rOut; | 186 | Stream &rOut; |
| 179 | Fmt fLast; | 187 | Fmt fLast; |
| 180 | bool bTempFmt; | 188 | bool bTempFmt; |
| 189 | uint8_t uIndent; | ||
| 190 | char cIndent; | ||
| 181 | }; | 191 | }; |
| 182 | 192 | ||
| 183 | typedef Formatter::Fmt Fmt; | 193 | typedef Formatter::Fmt Fmt; |
