summaryrefslogtreecommitdiff
path: root/utils/tfstats/tfstatsapplication.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/tfstats/tfstatsapplication.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'utils/tfstats/tfstatsapplication.h')
-rw-r--r--utils/tfstats/tfstatsapplication.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/utils/tfstats/tfstatsapplication.h b/utils/tfstats/tfstatsapplication.h
new file mode 100644
index 0000000..6e0f26e
--- /dev/null
+++ b/utils/tfstats/tfstatsapplication.h
@@ -0,0 +1,73 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Interface of the TFStatsApplication class.
+//
+// $Workfile: $
+// $Date: $
+//
+//------------------------------------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+#ifndef TFSTATSAPPLICATION_H
+#define TFSTATSAPPLICATION_H
+#ifdef WIN32
+#pragma once
+#endif
+#include <string>
+using std::string;
+#include "util.h"
+#include "HTML.h"
+#include "TFStatsOSInterface.h"
+
+//------------------------------------------------------------------------------------------------------
+// Purpose: Instances of this class contain information that is specific to one run
+//of TFStats. This serves as the main entry point for the program as well.
+//------------------------------------------------------------------------------------------------------
+class CTFStatsApplication
+{
+public:
+ CTFStatsOSInterface* os;
+ string outputDirectory;
+ string inputDirectory;
+ string ruleDirectory;
+ string supportDirectory;
+ string supportHTTPPath;
+ string playerDirectory;
+ string playerHTTPPath;
+
+ string logFileName;
+
+ bool eliminateOldPlayers;
+
+ int elimDays;
+ time_t getCutoffSeconds();
+
+ void makeAndSaveDirectory(string& dir);
+ void makeDirectory(string& dir);
+
+ //command line switches
+ //stored here with the name of the switch as the index
+ //and the value of the switch as the data
+ std::map<string,string> cmdLineSwitches;
+ void parseCmdLineArg(const char* in, char* var, char* val);
+ void ParseCommandLine(int argc, const char* argv[]);
+
+
+
+ void fatalError(PRINTF_FORMAT_STRING char* fmt,...);
+ void warning(PRINTF_FORMAT_STRING char* fmt,...);
+
+ void DoAwards(CHTMLFile& MatchResultsPage);
+ void DoMatchResults();
+
+ void printUsage();
+ void main(int argc, const char* argv[]);
+
+ int majorVer;
+ int minorVer;
+};
+
+extern CTFStatsApplication* g_pApp;
+#endif // TFSTATSAPPLICATION_H