00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
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