diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /tracker/AdminServer/TokenLine.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'tracker/AdminServer/TokenLine.h')
| -rw-r--r-- | tracker/AdminServer/TokenLine.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tracker/AdminServer/TokenLine.h b/tracker/AdminServer/TokenLine.h new file mode 100644 index 0000000..0096f05 --- /dev/null +++ b/tracker/AdminServer/TokenLine.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// TokenLine.h: interface for the CommandLine class. +// +////////////////////////////////////////////////////////////////////// + +#ifndef TOKENLINE_H +#define TOKENLINE_H + +#pragma once + +#define MAX_LINE_TOKENS 128 +#define MAX_LINE_CHARS 2048 + +class TokenLine +{ + +public: + TokenLine(); + TokenLine( char * string); + virtual ~TokenLine(); + + char * GetRestOfLine(int i); // returns all chars after token i + int CountToken(); // returns number of token + char * CheckToken(char * parm);// returns token after token parm or "" + char * GetToken(int i); // returns token i + char * GetLine(); // returns full line + bool SetLine (const char * newLine); // set new token line and parses it + + char m_tokenBuffer[MAX_LINE_CHARS]; + char m_fullLine[MAX_LINE_CHARS]; + char * m_token[MAX_LINE_TOKENS]; + int m_tokenNumber; + +}; + +#endif // !defined TOKENLINE_H |