UCILoader 1.1.2
Small C++ library that allows user to connect to a chess engines via UCI protocol.
Loading...
Searching...
No Matches
StandardChess::StandardChessMoveMarschaler Class Reference

Move marshaler for parsing UCI move strings into StandardChessMove objects. More...

#include <StandardChess.h>

Inheritance diagram for StandardChess::StandardChessMoveMarschaler:
UCILoader::Marschaler< StandardChessMove >

Public Member Functions

void loadInto (const std::string &token, StandardChessMove &target) const override
 Parse a UCI move string into a StandardChessMove.
 
- Public Member Functions inherited from UCILoader::Marschaler< StandardChessMove >
virtual void loadInto (const std::string &token, StandardChessMove &target) const=0
 
virtual StandardChessMove marshal (const std::string &token) const
 

Detailed Description

Move marshaler for parsing UCI move strings into StandardChessMove objects.

Implements the Marschaler<StandardChessMove> interface to convert UCI protocol move strings (e.g., "e2e4", "g7g8q") into StandardChessMove structures.

Used internally by the UCI parser when receiving move data from engines. This marshaler handles:

  • Standard moves (4 characters: e.g., "e2e4")
  • Promotion moves (5 characters: e.g., "e7e8q")
See also
UCILoader::Marschaler for the interface definition

Member Function Documentation

◆ loadInto()

void StandardChess::StandardChessMoveMarschaler::loadInto ( const std::string &  token,
StandardChessMove target 
) const
inlineoverride

Parse a UCI move string into a StandardChessMove.

Parameters
tokenThe UCI move string ("e2e4" or "e7e8q")
targetReference to StandardChessMove to populate

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