MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions
Tokenizer Class Reference

`#include <Tokenizer.hxx>`

## Public Member Functions
constexpr | Tokenizer (char *_input)
| Tokenizer (const Tokenizer &)=delete
Tokenizer & | operator= (const Tokenizer &)=delete
char * | Rest ()
char | CurrentChar () const
bool | IsEnd () const
char * | NextWord ()
| Reads the next word. More...
char * | NextUnquoted ()
| Reads the next unquoted word from the input string. More...
char * | NextString ()
| Reads the next quoted string from the input string. More...
char * | NextParam ()
| Reads the next unquoted word or quoted string from the input. More...

## Detailed Description

Definition at line 33 of file Tokenizer.hxx.

## Constructor & Destructor Documentation

constexpr Tokenizer::Tokenizer | ( | char * | _input | ) |
| inline

Parameters

  _input | the input string; the contents will be modified by this class

Definition at line 41 of file Tokenizer.hxx.

Tokenizer::Tokenizer | ( | const Tokenizer & |  | ) |
| delete

## Member Function Documentation

char Tokenizer::CurrentChar | ( |  | ) | const
| inline

Definition at line 50 of file Tokenizer.hxx.

bool Tokenizer::IsEnd | ( |  | ) | const
| inline

Definition at line 54 of file Tokenizer.hxx.

char* Tokenizer::NextParam | ( |  | ) |

Reads the next unquoted word or quoted string from the input.

This is a wrapper for NextUnquoted() and NextString(). Throws std::runtime_error on error.

Returns
  a pointer to the null-terminated string, or nullptr on end of line

char* Tokenizer::NextString | ( |  | ) |

Reads the next quoted string from the input string.

A backslash escapes the following character. This function modifies the input string. Throws std::runtime_error on error.

Returns
  a pointer to the null-terminated string, or nullptr end of line

char* Tokenizer::NextUnquoted | ( |  | ) |

Reads the next unquoted word from the input string.

Throws std::runtime_error on error.

Returns
  a pointer to the null-terminated word, or nullptr on end of line

char* Tokenizer::NextWord | ( |  | ) |

Reads the next word.

Throws std::runtime_error on error.

Returns
  a pointer to the null-terminated word, or nullptr on end of line

Tokenizer& Tokenizer::operator= | ( | const Tokenizer & |  | ) |
| delete

char* Tokenizer::Rest | ( |  | ) |
| inline

Definition at line 46 of file Tokenizer.hxx.

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

- util/Tokenizer.hxx