docs
Loading...
Searching...
No Matches
FieldToken< Owner, Value, Accessor, Validator >

#include <Ultralight/dom/data/Schema.h>

Overview

template<typename Owner, typename Value, typename Accessor, typename Validator = NoValidate>
struct ultralight::dom::data::FieldToken< Owner, Value, Accessor, Validator >

A field entry (the value Field() returns).

Pass it to Schema().

Public Types

using owner_type = Owner
 The type the accessor reads from (void without one).
using value_type = Value
 The field's value type.
using accessor_type = Accessor
 The accessor's type (std::nullptr_t without one).
using validator_type = Validator
 The type of the validator from Validate(), if any.

Static Public Attributes

static constexpr bool kHasAccessor = !std::is_same_v<Accessor, std::nullptr_t>
 Whether or not the field has an accessor.
static constexpr bool kHasValidator = !std::is_same_v<Validator, NoValidate>
 Whether or not a validator is attached with the Field() tag form of Validate().

Public Attributes

const char * name
 The field's name.
Accessor accessor
 Reads the value from a const instance.
ULTRALIGHT_DOM_NO_UNIQUE_ADDRESS Validator validator
 The validator, if any.
uint8_t flags = 0
 The EntryFlags set on this field.

Member Typedef Documentation

◆ accessor_type

template<typename Owner, typename Value, typename Accessor, typename Validator = NoValidate>
using accessor_type = Accessor

The accessor's type (std::nullptr_t without one).

◆ owner_type

template<typename Owner, typename Value, typename Accessor, typename Validator = NoValidate>
using owner_type = Owner

The type the accessor reads from (void without one).

◆ validator_type

template<typename Owner, typename Value, typename Accessor, typename Validator = NoValidate>
using validator_type = Validator

The type of the validator from Validate(), if any.

◆ value_type

template<typename Owner, typename Value, typename Accessor, typename Validator = NoValidate>
using value_type = Value

The field's value type.

Member Data Documentation

◆ accessor

template<typename Owner, typename Value, typename Accessor, typename Validator = NoValidate>
Accessor accessor

Reads the value from a const instance.

◆ flags

template<typename Owner, typename Value, typename Accessor, typename Validator = NoValidate>
uint8_t flags = 0

The EntryFlags set on this field.

◆ kHasAccessor

template<typename Owner, typename Value, typename Accessor, typename Validator = NoValidate>
bool kHasAccessor = !std::is_same_v<Accessor, std::nullptr_t>
staticconstexpr

Whether or not the field has an accessor.

◆ kHasValidator

template<typename Owner, typename Value, typename Accessor, typename Validator = NoValidate>
bool kHasValidator = !std::is_same_v<Validator, NoValidate>
staticconstexpr

Whether or not a validator is attached with the Field() tag form of Validate().

◆ name

template<typename Owner, typename Value, typename Accessor, typename Validator = NoValidate>
const char* name

The field's name.

◆ validator

template<typename Owner, typename Value, typename Accessor, typename Validator = NoValidate>
ULTRALIGHT_DOM_NO_UNIQUE_ADDRESS Validator validator

The validator, if any.


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