MPD: Request Class Reference

MPD 0.20.15

Public Member Functions
Request Class Reference

`#include <Request.hxx>`

Inheritance diagram for Request:
[legend]
Collaboration diagram for Request:
[legend]

## Public Member Functions
constexpr | Request (const char *const *argv, size_type n)
constexpr const char * | GetOptional (unsigned idx, const char *default_value=nullptr) const
int | ParseInt (unsigned idx) const
int | ParseInt (unsigned idx, int min_value, int max_value) const
int | ParseUnsigned (unsigned idx) const
int | ParseUnsigned (unsigned idx, unsigned max_value) const
bool | ParseBool (unsigned idx) const
RangeArg | ParseRange (unsigned idx) const
float | ParseFloat (unsigned idx) const
SongTime | ParseSongTime (unsigned idx) const
SignedSongTime | ParseSignedSongTime (unsigned idx) const
int | ParseOptional (unsigned idx, int default_value) const
RangeArg | ParseOptional (unsigned idx, RangeArg default_value) const
Public Member Functions inherited from ConstBuffer< const char *>
| ConstBuffer ()=default
constexpr | ConstBuffer (std::nullptr_t)
constexpr | ConstBuffer (pointer_type _data, size_type _size)
constexpr ConstBuffer< void > | ToVoid () const
constexpr bool | IsNull () const
constexpr bool | IsEmpty () const
gcc_pure bool | Contains (U &&u) const noexcept
constexpr iterator | begin () const
constexpr iterator | end () const
constexpr const_iterator | cbegin () const
constexpr const_iterator | cend () const
reference_type | operator[] (size_type i) const
reference_type | front () const
| Returns a reference to the first element. More...
reference_type | back () const
| Returns a reference to the last element. More...
void | pop_front ()
| Remove the first element (by moving the head pointer, does not actually modify the buffer). More...
void | pop_back ()
| Remove the last element (by moving the tail pointer, does not actually modify the buffer). More...
reference_type | shift ()
| Remove the first element and return a reference to it. More...
void | skip_front (size_type n)
void | MoveFront (pointer_type new_data)
| Move the front pointer to the given address, and adjust the size attribute to retain the old end address. More...

## Additional Inherited Members
Public Types inherited from ConstBuffer< const char *>
typedef size_t | size_type
typedef const const char * & | reference_type
typedef reference_type | const_reference_type
typedef const const char * * | pointer_type
typedef pointer_type | const_pointer_type
typedef pointer_type | iterator
typedef pointer_type | const_iterator
Static Public Member Functions inherited from ConstBuffer< const char *>
static constexpr ConstBuffer | Null ()
static ConstBuffer< const char * > | FromVoid (ConstBuffer< void > other)
| Cast a ConstBuffer<void> to a ConstBuffer<T>. More...
Data Fields inherited from ConstBuffer< const char *>
pointer_type | data
size_type | size

## Detailed Description

Definition at line 34 of file Request.hxx.

## Constructor & Destructor Documentation

## ◆ Request()

constexpr Request::Request | ( | const char *const * | argv,
|  | size_type | n
| ) |  |
| inline

Definition at line 38 of file Request.hxx.

## Member Function Documentation

## ◆ GetOptional()

constexpr const char* Request::GetOptional | ( | unsigned | idx,
|  | const char * | default_value = `nullptr`
| ) |  | const
| inline

Definition at line 41 of file Request.hxx.

## ◆ ParseBool()

bool Request::ParseBool | ( | unsigned | idx | ) | const
| inline

Definition at line 68 of file Request.hxx.

## ◆ ParseFloat()

float Request::ParseFloat | ( | unsigned | idx | ) | const
| inline

Definition at line 78 of file Request.hxx.

## ◆ ParseInt() [1/2]

int Request::ParseInt | ( | unsigned | idx | ) | const
| inline

Definition at line 48 of file Request.hxx.

## ◆ ParseInt() [2/2]

int Request::ParseInt | ( | unsigned | idx,
|  | int | min_value,
|  | int | max_value
| ) |  | const
| inline

Definition at line 53 of file Request.hxx.

## ◆ ParseOptional() [1/2]

int Request::ParseOptional | ( | unsigned | idx,
|  | int | default_value
| ) |  | const
| inline

Definition at line 93 of file Request.hxx.

## ◆ ParseOptional() [2/2]

RangeArg Request::ParseOptional | ( | unsigned | idx,
|  | RangeArg | default_value
| ) |  | const
| inline

Definition at line 99 of file Request.hxx.

## ◆ ParseRange()

RangeArg Request::ParseRange | ( | unsigned | idx | ) | const
| inline

Definition at line 73 of file Request.hxx.

## ◆ ParseSignedSongTime()

SignedSongTime Request::ParseSignedSongTime | ( | unsigned | idx | ) | const
| inline

Definition at line 88 of file Request.hxx.

## ◆ ParseSongTime()

SongTime Request::ParseSongTime | ( | unsigned | idx | ) | const
| inline

Definition at line 83 of file Request.hxx.

## ◆ ParseUnsigned() [1/2]

int Request::ParseUnsigned | ( | unsigned | idx | ) | const
| inline

Definition at line 58 of file Request.hxx.

## ◆ ParseUnsigned() [2/2]

int Request::ParseUnsigned | ( | unsigned | idx,
|  | unsigned | max_value
| ) |  | const
| inline

Definition at line 63 of file Request.hxx.

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

- command/Request.hxx