///////////////////////////////////////////////////////////////////

Synopsis

Declared in <folly/json/dynamic.h>

struct const_dynamic_view;

Member Functions

Name

Description

const_dynamic_view [constructor]

Constructors

operator=

Assignment operators

bool_or

Returns the viewed boolean, or the default if absent or not a boolean.

descend

Traverses a dynamic by repeatedly applying operator[].

double_or

Returns the viewed double, or the default if absent or not a double.

empty

Tests whether this view is not backed by a dynamic.

int_or

Returns the viewed integer, or the default if absent or not an integer.

reset

Resets the view to a default‐constructed state not backed by any dynamic.

string_or

string_or overloads

value_or

Returns a copy of the viewed dynamic, or a default if the view is empty.

operator bool

Tests whether this view is backed by a dynamic.

Protected Member Functions

Name

Description

const_dynamic_view [constructor]

Constructs a view from a dynamic pointer.

descend_

descend_ overloads

descend_unchecked_

descend_unchecked_ overloads

get_copy

Accesses a value by type, returning a copy.

Protected Data Members

Name

Description

d_

Pointer to the viewed dynamic, or nullptr when the view is empty.

Derived Classes

Name

Description

dynamic_view

A mutable view of a dynamic that can extract values without copying.

Created with MrDocs