GCC Middle and Back End API Reference
json::array Class Reference

#include <json.h>

Inheritance diagram for json::array:
Collaboration diagram for json::array:

Public Member Functions

 ~array ()
enum kind get_kind () const final override
void print (pretty_printer *pp, bool formatted) const final override
void append (value *v)
void dump (FILE *, bool formatted) const

Private Attributes

auto_vec< value * > m_elements

Detailed Description

Subclass of value for arrays.   

Constructor & Destructor Documentation

◆ ~array()

array::~array ( )
class json::array, a subclass of json::value, representing
an ordered collection of values.   
json::array's dtor.   

References FOR_EACH_VEC_ELT, i, and m_elements.

Member Function Documentation

◆ append()

◆ dump()

void value::dump ( FILE * outf,
bool formatted ) const
class json::value.   
Dump this json::value tree to OUTF.

The key/value pairs of json::objects are printed in the order
in which the keys were originally inserted.   

References ggc_alloc(), pp_buffer, pp_flush(), and json::value::print().

Referenced by json_output_format::flush_to_file(), and generate_results().

◆ get_kind()

enum kind json::array::get_kind ( ) const

Implements json::value.

References json::JSON_ARRAY.

◆ print()

void array::print ( pretty_printer * pp,
bool formatted ) const
Implementation of json::value::print for json::array.   

Implements json::value.

References FOR_EACH_VEC_ELT, ggc_alloc(), i, m_elements, pp_character(), pp_indent(), pp_indentation, pp_newline(), pp_space, pp_string(), and json::value::print().

Referenced by optrecord_json_writer::write().

Field Documentation

◆ m_elements

auto_vec<value *> json::array::m_elements

Referenced by append(), print(), and ~array().

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