v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::torque::ls::JsonValue Struct Reference

#include <json.h>

Collaboration diagram for v8::internal::torque::ls::JsonValue:

Public Types

enum  {
  OBJECT , ARRAY , STRING , NUMBER ,
  BOOL , IS_NULL
}
 

Public Member Functions

 JsonValue () V8_NOEXCEPT=default
 
constexpr JsonValue (const JsonValue &other)=delete
 
JsonValueoperator= (const JsonValue &other)=delete
 
 JsonValue (JsonValue &&other) V8_NOEXCEPT=default
 
JsonValueoperator= (JsonValue &&other) V8_NOEXCEPT=default
 
bool IsNumber () const
 
double ToNumber () const
 
bool IsBool () const
 
bool ToBool () const
 
bool IsString () const
 
const std::string & ToString () const
 
bool IsObject () const
 
const JsonObjectToObject () const
 
JsonObjectToObject ()
 
bool IsArray () const
 
const JsonArrayToArray () const
 
JsonArrayToArray ()
 

Static Public Member Functions

static JsonValue From (double number)
 
static JsonValue From (JsonObject object)
 
static JsonValue From (bool b)
 
static JsonValue From (const std::string &string)
 
static JsonValue From (JsonArray array)
 
static JsonValue JsonNull ()
 

Public Attributes

enum v8::internal::torque::ls::JsonValue:: { ... }  tag
 

Private Attributes

double number_ = 0
 
bool flag_ = false
 
std::string string_
 
std::unique_ptr< JsonObjectobject_
 
std::unique_ptr< JsonArrayarray_
 

Detailed Description

Definition at line 25 of file json.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
OBJECT 
ARRAY 
STRING 
NUMBER 
BOOL 
IS_NULL 

Definition at line 27 of file json.h.

Constructor & Destructor Documentation

◆ JsonValue() [1/3]

v8::internal::torque::ls::JsonValue::JsonValue ( )
default

◆ JsonValue() [2/3]

v8::internal::torque::ls::JsonValue::JsonValue ( const JsonValue & other)
constexprdelete

◆ JsonValue() [3/3]

v8::internal::torque::ls::JsonValue::JsonValue ( JsonValue && other)
default

Member Function Documentation

◆ From() [1/5]

static JsonValue v8::internal::torque::ls::JsonValue::From ( bool b)
inlinestatic

Definition at line 51 of file json.h.

◆ From() [2/5]

static JsonValue v8::internal::torque::ls::JsonValue::From ( const std::string & string)
inlinestatic

Definition at line 58 of file json.h.

◆ From() [3/5]

static JsonValue v8::internal::torque::ls::JsonValue::From ( double number)
inlinestatic

Definition at line 37 of file json.h.

Here is the caller graph for this function:

◆ From() [4/5]

static JsonValue v8::internal::torque::ls::JsonValue::From ( JsonArray array)
inlinestatic

Definition at line 65 of file json.h.

◆ From() [5/5]

static JsonValue v8::internal::torque::ls::JsonValue::From ( JsonObject object)
inlinestatic

Definition at line 44 of file json.h.

◆ IsArray()

bool v8::internal::torque::ls::JsonValue::IsArray ( ) const
inline

Definition at line 106 of file json.h.

Here is the caller graph for this function:

◆ IsBool()

bool v8::internal::torque::ls::JsonValue::IsBool ( ) const
inline

Definition at line 84 of file json.h.

Here is the caller graph for this function:

◆ IsNumber()

bool v8::internal::torque::ls::JsonValue::IsNumber ( ) const
inline

Definition at line 78 of file json.h.

Here is the caller graph for this function:

◆ IsObject()

bool v8::internal::torque::ls::JsonValue::IsObject ( ) const
inline

Definition at line 96 of file json.h.

Here is the caller graph for this function:

◆ IsString()

bool v8::internal::torque::ls::JsonValue::IsString ( ) const
inline

Definition at line 90 of file json.h.

Here is the caller graph for this function:

◆ JsonNull()

static JsonValue v8::internal::torque::ls::JsonValue::JsonNull ( )
inlinestatic

Definition at line 72 of file json.h.

Here is the caller graph for this function:

◆ operator=() [1/2]

JsonValue & v8::internal::torque::ls::JsonValue::operator= ( const JsonValue & other)
delete

◆ operator=() [2/2]

JsonValue & v8::internal::torque::ls::JsonValue::operator= ( JsonValue && other)
default

◆ ToArray() [1/2]

JsonArray & v8::internal::torque::ls::JsonValue::ToArray ( )
inline

Definition at line 111 of file json.h.

Here is the call graph for this function:

◆ ToArray() [2/2]

const JsonArray & v8::internal::torque::ls::JsonValue::ToArray ( ) const
inline

Definition at line 107 of file json.h.

Here is the call graph for this function:

◆ ToBool()

bool v8::internal::torque::ls::JsonValue::ToBool ( ) const
inline

Definition at line 85 of file json.h.

Here is the call graph for this function:

◆ ToNumber()

double v8::internal::torque::ls::JsonValue::ToNumber ( ) const
inline

Definition at line 79 of file json.h.

Here is the call graph for this function:

◆ ToObject() [1/2]

JsonObject & v8::internal::torque::ls::JsonValue::ToObject ( )
inline

Definition at line 101 of file json.h.

Here is the call graph for this function:

◆ ToObject() [2/2]

const JsonObject & v8::internal::torque::ls::JsonValue::ToObject ( ) const
inline

Definition at line 97 of file json.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ToString()

const std::string & v8::internal::torque::ls::JsonValue::ToString ( ) const
inline

Definition at line 91 of file json.h.

Here is the call graph for this function:

Member Data Documentation

◆ array_

std::unique_ptr<JsonArray> v8::internal::torque::ls::JsonValue::array_
private

Definition at line 121 of file json.h.

◆ flag_

bool v8::internal::torque::ls::JsonValue::flag_ = false
private

Definition at line 118 of file json.h.

◆ number_

double v8::internal::torque::ls::JsonValue::number_ = 0
private

Definition at line 117 of file json.h.

◆ object_

std::unique_ptr<JsonObject> v8::internal::torque::ls::JsonValue::object_
private

Definition at line 120 of file json.h.

◆ string_

std::string v8::internal::torque::ls::JsonValue::string_
private

Definition at line 119 of file json.h.

◆ []

enum { ... } v8::internal::torque::ls::JsonValue::tag

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