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

#include <ctoon.hpp>

Public Member Functions

 mut_document () CTOON_NOEXCEPT
 
 mut_document (ctoon_mut_doc *doc) CTOON_NOEXCEPT
 
 ~mut_document ()
 
 mut_document (mut_document &&o) CTOON_NOEXCEPT
 
mut_documentoperator= (mut_document &&o) CTOON_NOEXCEPT
 
unsigned char valid () const CTOON_NOEXCEPT
 
 operator unsigned char () const CTOON_NOEXCEPT
 
mut_value root () const CTOON_NOEXCEPT
 
mut_value operator* () const CTOON_NOEXCEPT
 
void set_root (mut_value v) CTOON_NOEXCEPT
 
ctoon_mut_doc * raw () const CTOON_NOEXCEPT
 
mut_value get_pointer (const string_view &ptr) const CTOON_NOEXCEPT
 
mut_value make_null () CTOON_NOEXCEPT
 
mut_value make_true () CTOON_NOEXCEPT
 
mut_value make_false () CTOON_NOEXCEPT
 
mut_value make_bool (unsigned char v) CTOON_NOEXCEPT
 
mut_value make_uint (std::uint64_t v) CTOON_NOEXCEPT
 
mut_value make_sint (std::int64_t v) CTOON_NOEXCEPT
 
mut_value make_real (double v) CTOON_NOEXCEPT
 
mut_value make_arr () CTOON_NOEXCEPT
 
mut_value make_obj () CTOON_NOEXCEPT
 
mut_value make_str (const char *s) CTOON_NOEXCEPT
 
mut_value make_str (const std::string &s) CTOON_NOEXCEPT
 
mut_value make_str (const string_view &s) CTOON_NOEXCEPT
 
write_result to_string (const write_options &opts=write_options()) const
 
void write_file (const char *path, const write_options &opts=write_options()) const
 
ctoon_mut_doc * release () CTOON_NOEXCEPT
 

Static Public Member Functions

static mut_document create ()
 

Public Attributes

ctoon_mut_doc * doc_
 

Detailed Description

Definition at line 692 of file ctoon.hpp.

Constructor & Destructor Documentation

◆ mut_document() [1/3]

ctoon::mut_document::mut_document ( )
inline

Definition at line 694 of file ctoon.hpp.

Referenced by create().

◆ mut_document() [2/3]

ctoon::mut_document::mut_document ( ctoon_mut_doc *  doc)
inlineexplicit

Definition at line 695 of file ctoon.hpp.

◆ ~mut_document()

ctoon::mut_document::~mut_document ( )
inline

Definition at line 696 of file ctoon.hpp.

References doc_.

◆ mut_document() [3/3]

ctoon::mut_document::mut_document ( mut_document &&  o)
inline

Definition at line 698 of file ctoon.hpp.

Member Function Documentation

◆ create()

static mut_document ctoon::mut_document::create ( )
inlinestatic

Definition at line 704 of file ctoon.hpp.

References mut_document().

Referenced by ctoon::make_document().

◆ get_pointer()

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

Definition at line 718 of file ctoon.hpp.

References doc_.

◆ make_arr()

mut_value ctoon::mut_document::make_arr ( )
inline

Definition at line 730 of file ctoon.hpp.

References doc_.

◆ make_bool()

mut_value ctoon::mut_document::make_bool ( unsigned char  v)
inline

Definition at line 726 of file ctoon.hpp.

References doc_.

◆ make_false()

mut_value ctoon::mut_document::make_false ( )
inline

Definition at line 725 of file ctoon.hpp.

References doc_.

◆ make_null()

mut_value ctoon::mut_document::make_null ( )
inline

Definition at line 723 of file ctoon.hpp.

References doc_.

◆ make_obj()

mut_value ctoon::mut_document::make_obj ( )
inline

Definition at line 731 of file ctoon.hpp.

References doc_.

◆ make_real()

mut_value ctoon::mut_document::make_real ( double  v)
inline

Definition at line 729 of file ctoon.hpp.

References doc_.

◆ make_sint()

mut_value ctoon::mut_document::make_sint ( std::int64_t  v)
inline

Definition at line 728 of file ctoon.hpp.

References doc_.

◆ make_str() [1/3]

mut_value ctoon::mut_document::make_str ( const char *  s)
inline

Definition at line 732 of file ctoon.hpp.

References doc_.

◆ make_str() [2/3]

mut_value ctoon::mut_document::make_str ( const std::string &  s)
inline

Definition at line 733 of file ctoon.hpp.

References doc_.

◆ make_str() [3/3]

mut_value ctoon::mut_document::make_str ( const string_view &  s)
inline

Definition at line 736 of file ctoon.hpp.

References doc_.

◆ make_true()

mut_value ctoon::mut_document::make_true ( )
inline

Definition at line 724 of file ctoon.hpp.

References doc_.

◆ make_uint()

mut_value ctoon::mut_document::make_uint ( std::uint64_t  v)
inline

Definition at line 727 of file ctoon.hpp.

References doc_.

◆ operator unsigned char()

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

Definition at line 712 of file ctoon.hpp.

References valid().

◆ operator*()

mut_value ctoon::mut_document::operator* ( ) const
inline

Definition at line 714 of file ctoon.hpp.

References root().

◆ operator=()

mut_document & ctoon::mut_document::operator= ( mut_document &&  o)
inline

Definition at line 699 of file ctoon.hpp.

References doc_.

◆ raw()

ctoon_mut_doc * ctoon::mut_document::raw ( ) const
inline

Definition at line 716 of file ctoon.hpp.

References doc_.

Referenced by to_string().

◆ release()

ctoon_mut_doc * ctoon::mut_document::release ( )
inline

Definition at line 780 of file ctoon.hpp.

References doc_.

◆ root()

mut_value ctoon::mut_document::root ( ) const
inline

Definition at line 713 of file ctoon.hpp.

References doc_.

Referenced by operator*().

◆ set_root()

void ctoon::mut_document::set_root ( mut_value  v)
inline

Definition at line 715 of file ctoon.hpp.

References doc_.

◆ to_string()

write_result ctoon::mut_document::to_string ( const write_options opts = write_options()) const
inline

Definition at line 741 of file ctoon.hpp.

References doc_, and raw().

Referenced by ctoon::to_string().

◆ valid()

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

Definition at line 711 of file ctoon.hpp.

References doc_.

Referenced by operator unsigned char().

◆ write_file()

void ctoon::mut_document::write_file ( const char *  path,
const write_options opts = write_options() 
) const
inline

Definition at line 749 of file ctoon.hpp.

References doc_.

Member Data Documentation

◆ doc_


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