Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

hyp.ker.trace.h

00001 /*
00002 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
00003  Hyperion Pattern.
00004  Hyperion Pattern is a part of the Hyperion Project.
00005 ----------------------------------------------------------
00006  Copyright (c) 2001 Pierre Rebours.
00007 
00008  This library is free software; you can redistribute it and/or
00009  modify it under the terms of the GNU Lesser General Public
00010  License as published by the Free Software Foundation; either
00011  version 2.1 of the License, or (at your option) any later version.
00012 
00013  This library is distributed in the hope that it will be useful,
00014  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  
00017  See hyp.license.txt file for more information about the license.
00018  
00019  Web: http://lagrandeporte.multimania.com/hyperion
00020  Email: amtycho@yahoo.fr
00021 ----------------------------------------------------------
00022  CVS
00023  $Log$
00024 
00025  Acknowledgements stx
00026  Creation 19/03/01 PR
00027 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
00028 */
00029 
00030 
00031 
00032 #ifndef _hyp_ker_trace_h_
00033 #define _hyp_ker_trace_h_
00034 
00035 #ifndef hyp_KERNEL_CORE_INSIDE
00036 #error Inclusion not allowed (include hyp.kernel.core.h instead)
00037 #endif
00038 
00039 hyp_ker_DLL std::ostream& GetTraceStream(void);
00040 hyp_ker_DLL void SetTraceStream(std::ostream&);
00041 hyp_ker_DLL std::string Begin(const char*, int);
00042 hyp_ker_DLL std::string Print(const char*,... );
00043 hyp_ker_DLL std::string End(void);
00044 
00048 
00053 #define hyp_TRACE_SET_FILE( Stream )            \
00054         hyp::ker::SetStreamTrace( Stream )
00055 
00059 #define hyp_TRACE( args )                       \
00060 {                                                   \
00061         hyp_TRACE_BEGIN;                            \
00062         hyp_TRACE_DO( args );                       \
00063         hyp_TRACE_END;                              \
00064 }
00065 
00071 #define hyp_TRACE_BEGIN                         \
00072         hyp::ker::GetTraceStream()<<hyp::ker::Begin( __FILE__, __LINE__ )
00073 
00080 #define hyp_TRACE_DO( Args )                    \
00081         hyp::ker::GetTraceStream()<<hyp::ker::Print Args
00082 
00086 #define hyp_TRACE_END                           \
00087         hyp::ker::GetTraceStream()<<hyp::ker::End()
00088 
00090 
00095 
00096 #define hyp_STRING_TRACE( String , Args )       \
00097 {                                                   \
00098         hyp_STRING_BEGIN( String );                 \
00099         hyp_STRING_DO( String , Args );             \
00100         hyp_STRING_END( String );                   \
00101 }
00102 
00103 #define hyp_STRING_BEGIN( String )              \
00104         String+=hyp::ker::Begin( __FILE__, __LINE__ )
00105 
00106 #define hyp_STRING_DO( String, Args )           \
00107         String+=hyp::ker::Print Args
00108 
00109 #define hyp_STRING_END( String )               \
00110         String+=hyp::ker::End()
00111 
00113 
00114 #endif

Top of Page
written by Pierre Rebours © 2000-2001. Terms of Use.