00001 //////////////////////////////////////////////////////////////////////
00002 // Copyright (c) 2001-2002 David Pritchard <drpritch@alumni.uwaterloo.ca>
00003 //
00004 // This program is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public License
00006 // as published by the Free Software Foundation; either
00007 // version 2 of the License, or (at your option) any later
00008 // version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013 // GNU Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018
00019 #include <freecloth/base/baTraceEntry.h>
00020 #include <freecloth/base/baTraceStream.h>
00021
00022 FREECLOTH_NAMESPACE_START
00023
00024 #ifndef NDEBUG
00025 ////////////////////////////////////////////////////////////////////////////////
00026 // CLASS BaTraceEntry
00027
00028 //------------------------------------------------------------------------------
00029
00030 BaTraceEntry::BaTraceEntry()
00031 {
00032 BaTraceStream& stream = BaTraceStream::theTraceStream();
00033
00034 stream.getStream()
00035 << stream.startl( BaTraceStream::LINE_INDENT );
00036 }
00037
00038 //------------------------------------------------------------------------------
00039
00040 BaTraceEntry::~BaTraceEntry()
00041 {
00042 BaTraceStream& stream = BaTraceStream::theTraceStream();
00043
00044 stream.unindent();
00045 stream.getStream()
00046 << stream.startl( BaTraceStream::LINE_UNINDENT )
00047 << std::endl;
00048 }
00049
00050 //------------------------------------------------------------------------------
00051
00052 std::ostream& BaTraceEntry::getStream()
00053 {
00054 return BaTraceStream::theTraceStream().getStream();
00055 }
00056
00057 //------------------------------------------------------------------------------
00058
00059 void BaTraceEntry::doneOutput()
00060 {
00061 BaTraceStream& stream = BaTraceStream::theTraceStream();
00062
00063 stream.getStream() << std::endl;
00064 stream.indent();
00065 }
00066 #endif
00067
00068 FREECLOTH_NAMESPACE_END
1.2.14 written by Dimitri van Heesch,
© 1997-2002