Zappy Server
C++ game server: world, rules, scheduler, network
Loading...
Searching...
No Matches
GuiParser Class Reference

Parses a raw GUI client line into a typed Gui::Request. More...

#include <GuiParser.hpp>

+ Collaboration diagram for GuiParser:

Static Public Member Functions

static std::optional< Gui::Requestparse (std::string_view line)
 Parse one line from a GUI client (no trailing newline).
 

Detailed Description

Parses a raw GUI client line into a typed Gui::Request.

Strict and case-sensitive. Returns nullopt on malformed input (missing args, bad integers, missing '#' prefix). Same policy as AiParser.

See also
G-YEP-400_zappy_GUI_protocol.pdf for syntax.

Definition at line 50 of file GuiParser.hpp.

Member Function Documentation

◆ parse()

std::optional< Gui::Request > GuiParser::parse ( std::string_view  line)
static

Parse one line from a GUI client (no trailing newline).

Returns
Parsed request, or nullopt if unknown or malformed.

Definition at line 14 of file GuiParser.cpp.

References parseInt(), and parsePlayerId().

Referenced by CommandDispatcher::_dispatchGui().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: