ArgScript::IParser class

This interface represents a command or block that can be parsed in ArgScript.

Parsers are mapped to keywords using the FormatParser::AddParser() method.

Derived classes

class IBlock
This parser represents a block of ArgScript lines.
class ICommand
This class is a type of IParser that can parse a single line of data.
class ISpecialBlock
This is a special kind of block that can process every line individually, and that uses its own end keywords.
class LambdaParser

Constructors, destructors, conversion operators

IParser()

Public functions

void ParseLine(const Line& line) pure virtual
auto GetDescription(DescriptionMode mode = DescriptionMode::Basic) const -> const char* virtual
Returns a basic or complete description of what this parser does.
void SetData(FormatParser* pFormatParser, void* pData) pure virtual
Sets the data and FormatParser of this parser.
auto AddRef() -> int virtual
auto Release() -> int virtual

Protected variables

FormatParser* mpFormatParser
int mnRefCount
void* mpData

Function documentation

const char* ArgScript::IParser::GetDescription(DescriptionMode mode = DescriptionMode::Basic) const virtual

Returns a basic or complete description of what this parser does.

Parameters
mode Whether the basic or complete description must be returned, in the DescriptionMode enum.

This usually includes information about how to use it, i.e. the arguments required, possible options, etc

void ArgScript::IParser::SetData(FormatParser* pFormatParser, void* pData) pure virtual

Sets the data and FormatParser of this parser.

This method is called when FormatParser::AddParser() or IBlock::AddParser() are used.