diff options
author | Marc Laukien <marc@zeroc.com> | 2002-02-10 12:52:13 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-02-10 12:52:13 +0000 |
commit | 44ecadaa1264fcc3d5eb9390da499d18cf3056cf (patch) | |
tree | 83ba8979ed4866e864e5f2e95fb3cf176e2b8b58 /cpp/src/IceUtil/OutputUtil.cpp | |
parent | fix (diff) | |
download | ice-44ecadaa1264fcc3d5eb9390da499d18cf3056cf.tar.bz2 ice-44ecadaa1264fcc3d5eb9390da499d18cf3056cf.tar.xz ice-44ecadaa1264fcc3d5eb9390da499d18cf3056cf.zip |
LoggerUtil
Diffstat (limited to 'cpp/src/IceUtil/OutputUtil.cpp')
-rw-r--r-- | cpp/src/IceUtil/OutputUtil.cpp | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/cpp/src/IceUtil/OutputUtil.cpp b/cpp/src/IceUtil/OutputUtil.cpp index 308b76b7bca..1eda98edc21 100644 --- a/cpp/src/IceUtil/OutputUtil.cpp +++ b/cpp/src/IceUtil/OutputUtil.cpp @@ -25,16 +25,16 @@ EndElement ee; } // ---------------------------------------------------------------------- -// Output +// OutputBase // ---------------------------------------------------------------------- IceUtil::OutputBase::OutputBase() : _out(_fout), _pos(0), _indent(0), - _separator(true), + _indentSize(4), _useTab(true), - _indentSize(4) + _separator(true) { } @@ -42,9 +42,9 @@ IceUtil::OutputBase::OutputBase(ostream& os) : _out(os), _pos(0), _indent(0), - _separator(true), + _indentSize(4), _useTab(true), - _indentSize(4) + _separator(true) { } @@ -53,9 +53,9 @@ IceUtil::OutputBase::OutputBase(const char* s) : _out(_fout), _pos(0), _indent(0), - _separator(true), + _indentSize(4), _useTab(true), - _indentSize(4) + _separator(true) { open(s); } @@ -184,6 +184,10 @@ IceUtil::OutputBase::operator!() const return !_out; } +// ---------------------------------------------------------------------- +// Output +// ---------------------------------------------------------------------- + IceUtil::Output::Output() : OutputBase(), _blockStart("{"), @@ -242,6 +246,19 @@ IceUtil::Output::eb() --_pos; } +Output& +IceUtil::operator<<(Output& out, ios_base& (*val)(ios_base&)) +{ + ostringstream s; + s << val; + out.print(s.str().c_str()); + return out; +} + +// ---------------------------------------------------------------------- +// XMLOutput +// ---------------------------------------------------------------------- + IceUtil::XMLOutput::XMLOutput() : OutputBase(), _printed(true), @@ -347,17 +364,6 @@ IceUtil::XMLOutput::ee() _printed = true; } - -Output& -IceUtil::operator<<(Output& out, ios_base& (*val)(ios_base&)) -{ - ostringstream s; - s << val; - out.print(s.str().c_str()); - return out; -} - - XMLOutput& IceUtil::operator<<(XMLOutput& out, ios_base& (*val)(ios_base&)) { |