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.

58 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Interface of CEventList
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //------------------------------------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef EVENTLIST_H
  14. #define EVENTLIST_H
  15. #ifdef WIN32
  16. #pragma once
  17. #endif
  18. #pragma warning(disable :4786)
  19. #include <list>
  20. #include <map>
  21. #include "LogEvent.h"
  22. #include "util.h"
  23. typedef std::list<const CLogEvent*> event_list;
  24. typedef std::list<const CLogEvent*>::iterator CEventListIterator;
  25. using namespace std;
  26. #include <cstring>
  27. #include <string>
  28. //------------------------------------------------------------------------------------------------------
  29. // Purpose: CEventList is just a thin wrapper around a list of CLogEvent objects
  30. // It also provides a factory method to read and return a CEventList from a
  31. // log file
  32. //------------------------------------------------------------------------------------------------------
  33. class CEventList
  34. {
  35. public:
  36. static CEventList* readEventList(const char* filename);
  37. void insert(CEventListIterator cli, const CLogEvent* cle){m_List.insert(cli,cle);}
  38. CEventListIterator begin(){return m_List.begin();}
  39. CEventListIterator end(){return m_List.end();}
  40. bool empty(){return m_List.empty();}
  41. private:
  42. event_list m_List;
  43. };
  44. #endif // EVENTLIST_H