summaryrefslogtreecommitdiff
path: root/utils/tfstats/argument.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/argument.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'utils/tfstats/argument.h')
-rw-r--r--utils/tfstats/argument.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/utils/tfstats/argument.h b/utils/tfstats/argument.h
new file mode 100644
index 0000000..b6f7136
--- /dev/null
+++ b/utils/tfstats/argument.h
@@ -0,0 +1,63 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Interface of CLogEventArgument
+//
+// $Workfile: $
+// $Date: $
+//
+//------------------------------------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+#ifndef ARGUMENT_H
+#define ARGUMENT_H
+#ifdef WIN32
+#pragma once
+#endif
+
+#include "pid.h"
+#include <vector>
+#include <string>
+
+//------------------------------------------------------------------------------------------------------
+// Purpose: CLogEventArgument represents a variable in the text of an event.
+// for example, "X" killed "Y" with "Z". X Y and Z are all represented by seperate
+// instances of this class.
+//------------------------------------------------------------------------------------------------------
+class CLogEventArgument
+{
+public:
+ enum
+ {
+ INVALID_PID=-1,
+ INVALID_WONID=0,
+ VALUE_WID=64,
+ PLAYER_NAME_WID=VALUE_WID,
+ WONID_WID=(10+6), //<WON:xxxxxxxxxx>
+ PLAYERID_WID=4 // <xx> //only up to 99 players :(
+ };
+
+private:
+ char* m_ArgText;
+ bool m_Valid;
+public:
+ explicit CLogEventArgument(const char* text);
+ CLogEventArgument();
+ void init(const char* text);
+
+ //int asPlayerGetID() const;
+ int asPlayerGetSvrPID() const;
+ unsigned long asPlayerGetWONID() const;
+ PID asPlayerGetPID() const;
+ char* asPlayerGetName(char* copybuf) const;
+ std::string asPlayerGetName() const;
+ double getFloatValue() const;
+ const char* getStringValue() const;
+ char* getStringValue(char* copybuf) const;
+ bool isValid() const {return m_Valid;}
+};
+
+typedef std::vector<CLogEventArgument*> ArgVector;
+
+#endif // ARGUMENT_H