Main Page   Class Hierarchy   Compound List   File List   Compound Members  

baTraceStream.h

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 #ifndef freecloth_base_baTraceStream_h
00020 #define freecloth_base_baTraceStream_h
00021 
00022 #ifndef freecloth_base_package_h
00023 #include <freecloth/base/package.h>
00024 #endif
00025 
00026 #ifndef freecloth_base_types_h
00027 #include <freecloth/base/types.h>
00028 #endif
00029 
00030 #ifndef freecloth_base_iostream
00031 #include <freecloth/base/iostream>
00032 #endif
00033 
00034 FREECLOTH_NAMESPACE_START
00035 
00036 ////////////////////////////////////////////////////////////////////////////////
00037 // FORWARD DECLARATIONS
00038 //
00039 
00040 ////////////////////////////////////////////////////////////////////////////////
00041 /*!
00042  * \internal
00043  * \class BaTraceStream freecloth/base/baTraceStream.h
00044  * \brief Output stream for DGFX_TRACE_* macros.
00045  *
00046  * Maintains indentation level, etc.
00047  */
00048 class BaTraceStream {
00049 
00050 public:
00051     // ----- types and enumerations -----
00052     enum LineType {
00053         LINE_NORMAL,
00054         LINE_INDENT,
00055         LINE_UNINDENT
00056     };
00057 
00058     // ----- static member functions -----
00059     static BaTraceStream& theTraceStream();
00060 
00061     // ----- member functions -----
00062     ~BaTraceStream();
00063     std::ostream& getStream();
00064     String startl( LineType = LINE_NORMAL ) const;
00065     void indent();
00066     void unindent();
00067 
00068 private:
00069 
00070     // ----- classes -----
00071     class Imp;
00072 
00073     // ----- member functions -----
00074     BaTraceStream();
00075 
00076     // ----- static data members -----
00077     static BaTraceStream _theTraceStream;
00078 
00079     // ----- data members -----
00080     Imp* _imp;
00081 
00082 };
00083 
00084 FREECLOTH_NAMESPACE_END
00085 #endif

Generated on Wed Apr 23 15:58:46 2003 for Freecloth by doxygen1.3-rc3