Counter Strike : Global Offensive Source Code
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.

60 lines
1.5 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef IVPROFEXPORT_H
  7. #define IVPROFEXPORT_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tier0/vprof.h"
  12. #define VPROF_EXPORT_INTERFACE_VERSION "VProfExport001"
  13. #include <color.h>
  14. abstract_class IVProfExport
  15. {
  16. public:
  17. enum
  18. {
  19. MAX_BUDGETGROUP_TIMES = 512
  20. };
  21. class CExportedBudgetGroupInfo
  22. {
  23. public:
  24. const char *m_pName;
  25. int m_BudgetFlags; // Combination of BUDGETFLAG_ defines (in vprof.h)
  26. Color m_Color;
  27. };
  28. public:
  29. // Use this to register and unregister for the vprof data (if you don't, GetBudgetGroupTimes may return no data).
  30. virtual void AddListener() = 0;
  31. virtual void RemoveListener() = 0;
  32. // Pause/resume profiling so it doesn't capture data we don't want.
  33. virtual void PauseProfile() = 0;
  34. virtual void ResumeProfile() = 0;
  35. // Set a combination of BUDGETFLAG_ defines to define what data you're get back.
  36. // Note: this defines which budget groups to REJECT (ones that have flags that are in filter won't be returned).
  37. virtual void SetBudgetFlagsFilter( int filter ) = 0;
  38. // Use budgetFlags to filter out which budget groups you're interested in.
  39. virtual int GetNumBudgetGroups() = 0;
  40. // pInfos must have space to hold the return value from GetNumBudgetGroups().
  41. virtual void GetBudgetGroupInfos( CExportedBudgetGroupInfo *pInfos ) = 0;
  42. virtual void GetBudgetGroupTimes( float times[MAX_BUDGETGROUP_TIMES] ) = 0;
  43. };
  44. #endif // IVPROFEXPORT_H