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.

73 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Interface of the TFStatsApplication class.
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //------------------------------------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef TFSTATSAPPLICATION_H
  14. #define TFSTATSAPPLICATION_H
  15. #ifdef WIN32
  16. #pragma once
  17. #endif
  18. #include <string>
  19. using std::string;
  20. #include "util.h"
  21. #include "HTML.h"
  22. #include "TFStatsOSInterface.h"
  23. //------------------------------------------------------------------------------------------------------
  24. // Purpose: Instances of this class contain information that is specific to one run
  25. //of TFStats. This serves as the main entry point for the program as well.
  26. //------------------------------------------------------------------------------------------------------
  27. class CTFStatsApplication
  28. {
  29. public:
  30. CTFStatsOSInterface* os;
  31. string outputDirectory;
  32. string inputDirectory;
  33. string ruleDirectory;
  34. string supportDirectory;
  35. string supportHTTPPath;
  36. string playerDirectory;
  37. string playerHTTPPath;
  38. string logFileName;
  39. bool eliminateOldPlayers;
  40. int elimDays;
  41. time_t getCutoffSeconds();
  42. void makeAndSaveDirectory(string& dir);
  43. void makeDirectory(string& dir);
  44. //command line switches
  45. //stored here with the name of the switch as the index
  46. //and the value of the switch as the data
  47. std::map<string,string> cmdLineSwitches;
  48. void parseCmdLineArg(const char* in, char* var, char* val);
  49. void ParseCommandLine(int argc, const char* argv[]);
  50. void fatalError(PRINTF_FORMAT_STRING char* fmt,...);
  51. void warning(PRINTF_FORMAT_STRING char* fmt,...);
  52. void DoAwards(CHTMLFile& MatchResultsPage);
  53. void DoMatchResults();
  54. void printUsage();
  55. void main(int argc, const char* argv[]);
  56. int majorVer;
  57. int minorVer;
  58. };
  59. extern CTFStatsApplication* g_pApp;
  60. #endif // TFSTATSAPPLICATION_H