#include <public/ITextParsers.h>
Inherits SourceMod::SMInterface.
Inheritance diagram for SourceMod::ITextParsers:
Public Member Functions | |
| virtual const char * | GetInterfaceName () |
| Must return a string defining the interface's unique name. | |
| virtual unsigned int | GetInterfaceVersion () |
| Must return an integer defining the interface's version. | |
| virtual bool | IsVersionCompatible (unsigned int version) |
| Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning. | |
| virtual bool | ParseFile_INI (const char *file, ITextListener_INI *ini_listener, unsigned int *line, unsigned int *col)=0 |
| Parses an INI-format file. | |
| virtual SMCError | ParseFile_SMC (const char *file, ITextListener_SMC *smc_listener, SMCStates *states)=0 |
| Parses an SMC-format text file. Note that the parser makes every effort to obey broken syntax. For example, if an open brace is missing, but the section name has a colon, it will let you know. It is up to the event handlers to decide whether to be strict or not. | |
| virtual const char * | GetSMCErrorString (SMCError err)=0 |
| Converts an SMCError to a string. | |
| virtual unsigned int | GetUTF8CharBytes (const char *stream)=0 |
| Returns the number of bytes that a multi-byte character contains in a UTF-8 stream. If the current character is not multi-byte, the function returns 1. | |
| virtual bool | IsWhitespace (const char *stream)=0 |
| Returns whether the first multi-byte character in the given stream is a whitespace character. | |
| virtual SMCError | ParseSMCFile (const char *file, ITextListener_SMC *smc_listener, SMCStates *states, char *buffer, size_t maxsize)=0 |
| Same as ParseFile_SMC, but with an extended error buffer. | |
Definition at line 318 of file ITextParsers.h.
| virtual bool SourceMod::ITextParsers::IsVersionCompatible | ( | unsigned int | version | ) | [inline, virtual] |
Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning.
| version | Version number to compare against. |
Reimplemented from SourceMod::SMInterface.
Definition at line 329 of file ITextParsers.h.
| virtual bool SourceMod::ITextParsers::ParseFile_INI | ( | const char * | file, | |
| ITextListener_INI * | ini_listener, | |||
| unsigned int * | line, | |||
| unsigned int * | col | |||
| ) | [pure virtual] |
Parses an INI-format file.
| file | Path to file. | |
| ini_listener | Event handler for reading file. | |
| line | If non-NULL, will contain last line parsed (0 if file could not be opened). | |
| col | If non-NULL, will contain last column parsed (undefined if file could not be opened). |
| virtual SMCError SourceMod::ITextParsers::ParseFile_SMC | ( | const char * | file, | |
| ITextListener_SMC * | smc_listener, | |||
| SMCStates * | states | |||
| ) | [pure virtual] |
Parses an SMC-format text file. Note that the parser makes every effort to obey broken syntax. For example, if an open brace is missing, but the section name has a colon, it will let you know. It is up to the event handlers to decide whether to be strict or not.
| file | Path to file. | |
| smc_listener | Event handler for reading file. | |
| states | Optional pointer to store last known states. |
| virtual const char* SourceMod::ITextParsers::GetSMCErrorString | ( | SMCError | err | ) | [pure virtual] |
Converts an SMCError to a string.
| err | SMCError. |
| virtual unsigned int SourceMod::ITextParsers::GetUTF8CharBytes | ( | const char * | stream | ) | [pure virtual] |
Returns the number of bytes that a multi-byte character contains in a UTF-8 stream. If the current character is not multi-byte, the function returns 1.
| stream | Pointer to multi-byte ANSI character string. |
| virtual bool SourceMod::ITextParsers::IsWhitespace | ( | const char * | stream | ) | [pure virtual] |
Returns whether the first multi-byte character in the given stream is a whitespace character.
| stream | Pointer to multi-byte character string. |
| virtual SMCError SourceMod::ITextParsers::ParseSMCFile | ( | const char * | file, | |
| ITextListener_SMC * | smc_listener, | |||
| SMCStates * | states, | |||
| char * | buffer, | |||
| size_t | maxsize | |||
| ) | [pure virtual] |
Same as ParseFile_SMC, but with an extended error buffer.
| file | Path to file. | |
| smc_listener | Event handler for reading file. | |
| states | Optional pointer to store last known states. | |
| buffer | Error message buffer. | |
| maxsize | Maximum size of the error buffer. |
1.5.1