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

#include <json.h>

Inheritance diagram for json::float_number:
Collaboration diagram for json::float_number:

Public Member Functions

 float_number (double value)
 
enum kind get_kind () const final override
 
void print (pretty_printer *pp, bool formatted) const final override
 
double get () const
 
void dump (FILE *, bool formatted) const
 

Private Attributes

double m_value
 

Detailed Description

Subclass of value for floating-point numbers.   

Constructor & Destructor Documentation

◆ float_number()

json::float_number::float_number ( double value)
inline

Member Function Documentation

◆ dump()

void value::dump ( FILE * outf,
bool formatted ) const
inherited
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()

double json::float_number::get ( ) const
inline

References m_value.

◆ get_kind()

enum kind json::float_number::get_kind ( ) const
inlinefinaloverridevirtual

Implements json::value.

References json::JSON_FLOAT.

◆ print()

void float_number::print ( pretty_printer * pp,
bool formatted ) const
finaloverridevirtual
class json::float_number, a subclass of json::value, wrapping a double.   
Implementation of json::value::print for json::float_number.   

Implements json::value.

References ggc_alloc(), m_value, and pp_string().

Field Documentation

◆ m_value

double json::float_number::m_value
private

Referenced by get(), and print().


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