Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Allows matching of initialization and shutdown function calls
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #if !defined( TRACEINIT_H )
  8. #define TRACEINIT_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. void TraceInit( const char *i, const char *s, int list );
  13. #ifdef _XBOX
  14. void TraceInitFinish( const char *i );
  15. #endif
  16. void TraceShutdown( const char *s, int list );
  17. #ifndef _XBOX
  18. #define TRACEINITNUM( initfunc, shutdownfunc, num ) \
  19. TraceInit( #initfunc, #shutdownfunc, num ); \
  20. initfunc;
  21. #else
  22. #define TRACEINITNUM( initfunc, shutdownfunc, num ) \
  23. TraceInit( #initfunc, #shutdownfunc, num ); \
  24. initfunc; \
  25. TraceInitFinish( #initfunc );
  26. #endif
  27. #define TRACESHUTDOWNNUM( shutdownfunc, num ) \
  28. TraceShutdown( #shutdownfunc, num ); \
  29. shutdownfunc;
  30. #define TRACEINIT( initfunc, shutdownfunc ) TRACEINITNUM( initfunc, shutdownfunc, 0 )
  31. #define TRACESHUTDOWN( shutdownfunc ) TRACESHUTDOWNNUM( shutdownfunc, 0 )
  32. #endif // TRACEINIT_H