CToon C++ 0.6.1
A C++ TOON/JSON serialization library
Loading...
Searching...
No Matches
ctoon::mut_value Class Reference

#include <ctoon.hpp>

Public Member Functions

 mut_value () CTOON_NOEXCEPT
 
 mut_value (ctoon_mut_val *v) CTOON_NOEXCEPT
 
ctoon_mut_val * raw () const CTOON_NOEXCEPT
 
unsigned char valid () const CTOON_NOEXCEPT
 
 operator unsigned char () const CTOON_NOEXCEPT
 
unsigned char is_null () const CTOON_NOEXCEPT
 
unsigned char is_true () const CTOON_NOEXCEPT
 
unsigned char is_false () const CTOON_NOEXCEPT
 
unsigned char is_bool () const CTOON_NOEXCEPT
 
unsigned char is_uint () const CTOON_NOEXCEPT
 
unsigned char is_sint () const CTOON_NOEXCEPT
 
unsigned char is_int () const CTOON_NOEXCEPT
 
unsigned char is_real () const CTOON_NOEXCEPT
 
unsigned char is_num () const CTOON_NOEXCEPT
 
unsigned char is_str () const CTOON_NOEXCEPT
 
unsigned char is_arr () const CTOON_NOEXCEPT
 
unsigned char is_obj () const CTOON_NOEXCEPT
 
unsigned char get_bool () const CTOON_NOEXCEPT
 
std::uint64_t get_uint () const CTOON_NOEXCEPT
 
std::int64_t get_sint () const CTOON_NOEXCEPT
 
double get_real () const CTOON_NOEXCEPT
 
double get_num () const CTOON_NOEXCEPT
 
std::size_t get_len () const CTOON_NOEXCEPT
 
string_view get_str () const CTOON_NOEXCEPT
 
std::size_t arr_size () const CTOON_NOEXCEPT
 
mut_value arr_get (std::size_t i) const CTOON_NOEXCEPT
 
mut_value arr_first () const CTOON_NOEXCEPT
 
mut_value arr_last () const CTOON_NOEXCEPT
 
mut_value operator[] (std::size_t i) const CTOON_NOEXCEPT
 
std::size_t obj_size () const CTOON_NOEXCEPT
 
mut_value obj_get (const char *key) const CTOON_NOEXCEPT
 
mut_value obj_get (const string_view &key) const CTOON_NOEXCEPT
 
mut_value operator[] (const char *key) const CTOON_NOEXCEPT
 
mut_value operator[] (const string_view &key) const CTOON_NOEXCEPT
 
unsigned char equals (const mut_value &rhs) const CTOON_NOEXCEPT
 
unsigned char equals (const char *s) const CTOON_NOEXCEPT
 
unsigned char equals (const string_view &s) const CTOON_NOEXCEPT
 
mut_value get_pointer (const string_view &ptr) const CTOON_NOEXCEPT
 
unsigned char arr_append (mut_value item) const CTOON_NOEXCEPT
 
unsigned char arr_prepend (mut_value item) const CTOON_NOEXCEPT
 
unsigned char arr_clear () const CTOON_NOEXCEPT
 
mut_value arr_remove (std::size_t i) const CTOON_NOEXCEPT
 
unsigned char obj_add (mut_value key, mut_value val) const CTOON_NOEXCEPT
 
unsigned char obj_put (mut_value key, mut_value val) const CTOON_NOEXCEPT
 
unsigned char obj_clear () const CTOON_NOEXCEPT
 
mut_value obj_remove (const string_view &key) const CTOON_NOEXCEPT
 

Protected Attributes

ctoon_mut_val * v_
 

Detailed Description

Definition at line 406 of file ctoon.hpp.

Constructor & Destructor Documentation

◆ mut_value() [1/2]

ctoon::mut_value::mut_value ( )
inline

Definition at line 408 of file ctoon.hpp.

Referenced by arr_first(), arr_get(), arr_last(), arr_remove(), get_pointer(), obj_get(), obj_get(), and obj_remove().

◆ mut_value() [2/2]

ctoon::mut_value::mut_value ( ctoon_mut_val *  v)
inlineexplicit

Definition at line 409 of file ctoon.hpp.

Member Function Documentation

◆ arr_append()

unsigned char ctoon::mut_value::arr_append ( mut_value  item) const
inline

Definition at line 469 of file ctoon.hpp.

References v_.

◆ arr_clear()

unsigned char ctoon::mut_value::arr_clear ( ) const
inline

Definition at line 471 of file ctoon.hpp.

References v_.

◆ arr_first()

mut_value ctoon::mut_value::arr_first ( ) const
inline

Definition at line 445 of file ctoon.hpp.

References mut_value(), and v_.

◆ arr_get()

mut_value ctoon::mut_value::arr_get ( std::size_t  i) const
inline

Definition at line 444 of file ctoon.hpp.

References mut_value(), and v_.

Referenced by operator[]().

◆ arr_last()

mut_value ctoon::mut_value::arr_last ( ) const
inline

Definition at line 446 of file ctoon.hpp.

References mut_value(), and v_.

◆ arr_prepend()

unsigned char ctoon::mut_value::arr_prepend ( mut_value  item) const
inline

Definition at line 470 of file ctoon.hpp.

References v_.

◆ arr_remove()

mut_value ctoon::mut_value::arr_remove ( std::size_t  i) const
inline

Definition at line 472 of file ctoon.hpp.

References mut_value(), and v_.

◆ arr_size()

std::size_t ctoon::mut_value::arr_size ( ) const
inline

Definition at line 443 of file ctoon.hpp.

References v_.

◆ equals() [1/3]

unsigned char ctoon::mut_value::equals ( const char *  s) const
inline

Definition at line 460 of file ctoon.hpp.

References v_.

◆ equals() [2/3]

unsigned char ctoon::mut_value::equals ( const mut_value rhs) const
inline

Definition at line 459 of file ctoon.hpp.

References v_.

◆ equals() [3/3]

unsigned char ctoon::mut_value::equals ( const string_view &  s) const
inline

Definition at line 461 of file ctoon.hpp.

References v_.

◆ get_bool()

unsigned char ctoon::mut_value::get_bool ( ) const
inline

Definition at line 430 of file ctoon.hpp.

References v_.

◆ get_len()

std::size_t ctoon::mut_value::get_len ( ) const
inline

Definition at line 435 of file ctoon.hpp.

References v_.

◆ get_num()

double ctoon::mut_value::get_num ( ) const
inline

Definition at line 434 of file ctoon.hpp.

References v_.

◆ get_pointer()

mut_value ctoon::mut_value::get_pointer ( const string_view &  ptr) const
inline

Definition at line 464 of file ctoon.hpp.

References mut_value(), and v_.

◆ get_real()

double ctoon::mut_value::get_real ( ) const
inline

Definition at line 433 of file ctoon.hpp.

References v_.

◆ get_sint()

std::int64_t ctoon::mut_value::get_sint ( ) const
inline

Definition at line 432 of file ctoon.hpp.

References v_.

◆ get_str()

string_view ctoon::mut_value::get_str ( ) const
inline

Definition at line 436 of file ctoon.hpp.

References v_.

◆ get_uint()

std::uint64_t ctoon::mut_value::get_uint ( ) const
inline

Definition at line 431 of file ctoon.hpp.

References v_.

◆ is_arr()

unsigned char ctoon::mut_value::is_arr ( ) const
inline

Definition at line 426 of file ctoon.hpp.

References v_.

◆ is_bool()

unsigned char ctoon::mut_value::is_bool ( ) const
inline

Definition at line 419 of file ctoon.hpp.

References v_.

◆ is_false()

unsigned char ctoon::mut_value::is_false ( ) const
inline

Definition at line 418 of file ctoon.hpp.

References v_.

◆ is_int()

unsigned char ctoon::mut_value::is_int ( ) const
inline

Definition at line 422 of file ctoon.hpp.

References v_.

◆ is_null()

unsigned char ctoon::mut_value::is_null ( ) const
inline

Definition at line 416 of file ctoon.hpp.

References v_.

◆ is_num()

unsigned char ctoon::mut_value::is_num ( ) const
inline

Definition at line 424 of file ctoon.hpp.

References v_.

◆ is_obj()

unsigned char ctoon::mut_value::is_obj ( ) const
inline

Definition at line 427 of file ctoon.hpp.

References v_.

◆ is_real()

unsigned char ctoon::mut_value::is_real ( ) const
inline

Definition at line 423 of file ctoon.hpp.

References v_.

◆ is_sint()

unsigned char ctoon::mut_value::is_sint ( ) const
inline

Definition at line 421 of file ctoon.hpp.

References v_.

◆ is_str()

unsigned char ctoon::mut_value::is_str ( ) const
inline

Definition at line 425 of file ctoon.hpp.

References v_.

◆ is_true()

unsigned char ctoon::mut_value::is_true ( ) const
inline

Definition at line 417 of file ctoon.hpp.

References v_.

◆ is_uint()

unsigned char ctoon::mut_value::is_uint ( ) const
inline

Definition at line 420 of file ctoon.hpp.

References v_.

◆ obj_add()

unsigned char ctoon::mut_value::obj_add ( mut_value  key,
mut_value  val 
) const
inline

Definition at line 477 of file ctoon.hpp.

References v_.

◆ obj_clear()

unsigned char ctoon::mut_value::obj_clear ( ) const
inline

Definition at line 483 of file ctoon.hpp.

References v_.

◆ obj_get() [1/2]

mut_value ctoon::mut_value::obj_get ( const char *  key) const
inline

Definition at line 451 of file ctoon.hpp.

References mut_value(), and v_.

Referenced by operator[](), and operator[]().

◆ obj_get() [2/2]

mut_value ctoon::mut_value::obj_get ( const string_view &  key) const
inline

Definition at line 452 of file ctoon.hpp.

References mut_value(), and v_.

◆ obj_put()

unsigned char ctoon::mut_value::obj_put ( mut_value  key,
mut_value  val 
) const
inline

Definition at line 480 of file ctoon.hpp.

References v_.

◆ obj_remove()

mut_value ctoon::mut_value::obj_remove ( const string_view &  key) const
inline

Definition at line 484 of file ctoon.hpp.

References mut_value(), and v_.

◆ obj_size()

std::size_t ctoon::mut_value::obj_size ( ) const
inline

Definition at line 450 of file ctoon.hpp.

References v_.

◆ operator unsigned char()

ctoon::mut_value::operator unsigned char ( ) const
inline

Definition at line 413 of file ctoon.hpp.

References valid().

◆ operator[]() [1/3]

mut_value ctoon::mut_value::operator[] ( const char *  key) const
inline

Definition at line 455 of file ctoon.hpp.

References obj_get().

◆ operator[]() [2/3]

mut_value ctoon::mut_value::operator[] ( const string_view &  key) const
inline

Definition at line 456 of file ctoon.hpp.

References obj_get().

◆ operator[]() [3/3]

mut_value ctoon::mut_value::operator[] ( std::size_t  i) const
inline

Definition at line 447 of file ctoon.hpp.

References arr_get().

◆ raw()

ctoon_mut_val * ctoon::mut_value::raw ( ) const
inline

Definition at line 411 of file ctoon.hpp.

References v_.

◆ valid()

unsigned char ctoon::mut_value::valid ( ) const
inline

Definition at line 412 of file ctoon.hpp.

References v_.

Referenced by operator unsigned char().

Member Data Documentation

◆ v_


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