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

#include <ctoon.hpp>

Public Member Functions

 document () CTOON_NOEXCEPT
 
 document (ctoon_doc *doc) CTOON_NOEXCEPT
 
 ~document ()
 
 document (document &&o) CTOON_NOEXCEPT
 
documentoperator= (document &&o) CTOON_NOEXCEPT
 
unsigned char valid () const CTOON_NOEXCEPT
 
 operator unsigned char () const CTOON_NOEXCEPT
 
value root () const CTOON_NOEXCEPT
 
value operator* () const CTOON_NOEXCEPT
 
ctoon_doc * raw () const CTOON_NOEXCEPT
 
std::size_t read_size () const CTOON_NOEXCEPT
 
std::size_t val_count () const CTOON_NOEXCEPT
 
value get_pointer (const string_view &ptr) const 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
 
mut_document mut_copy () const
 
ctoon_doc * release () CTOON_NOEXCEPT
 

Static Public Member Functions

static document parse (const char *toon, std::size_t len, read_flag flags=read_flag::NOFLAG)
 
static document parse (const char *toon, read_flag flags=read_flag::NOFLAG)
 
static document parse (const std::string &toon, read_flag flags=read_flag::NOFLAG)
 
static document parse (const string_view &toon, read_flag flags=read_flag::NOFLAG)
 
static document parse_indent (const char *toon, std::size_t len, int indent_size, read_flag flags=read_flag::NOFLAG)
 
static document parse_indent (const std::string &toon, int indent_size, read_flag flags=read_flag::NOFLAG)
 
static document parse_indent (const string_view &toon, int indent_size, read_flag flags=read_flag::NOFLAG)
 
static document parse_file (const char *path, read_flag flags=read_flag::NOFLAG)
 

Public Attributes

ctoon_doc * doc_
 

Detailed Description

Definition at line 548 of file ctoon.hpp.

Constructor & Destructor Documentation

◆ document() [1/3]

ctoon::document::document ( )
inline

Definition at line 550 of file ctoon.hpp.

Referenced by parse(), parse_file(), and parse_indent().

◆ document() [2/3]

ctoon::document::document ( ctoon_doc *  doc)
inlineexplicit

Definition at line 551 of file ctoon.hpp.

◆ ~document()

ctoon::document::~document ( )
inline

Definition at line 552 of file ctoon.hpp.

References doc_.

◆ document() [3/3]

ctoon::document::document ( document &&  o)
inline

Definition at line 554 of file ctoon.hpp.

Member Function Documentation

◆ get_pointer()

value ctoon::document::get_pointer ( const string_view &  ptr) const
inline

Definition at line 636 of file ctoon.hpp.

References doc_.

◆ mut_copy()

mut_document ctoon::document::mut_copy ( ) const
inline

Definition at line 786 of file ctoon.hpp.

References doc_.

◆ operator unsigned char()

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

Definition at line 629 of file ctoon.hpp.

References valid().

◆ operator*()

value ctoon::document::operator* ( ) const
inline

Definition at line 631 of file ctoon.hpp.

References root().

◆ operator=()

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

Definition at line 555 of file ctoon.hpp.

References doc_.

◆ parse() [1/4]

static document ctoon::document::parse ( const char *  toon,
read_flag  flags = read_flag::NOFLAG 
)
inlinestatic

Definition at line 568 of file ctoon.hpp.

References parse().

◆ parse() [2/4]

static document ctoon::document::parse ( const char *  toon,
std::size_t  len,
read_flag  flags = read_flag::NOFLAG 
)
inlinestatic

Definition at line 561 of file ctoon.hpp.

References document(), and ctoon::to_c().

Referenced by parse(), ctoon::parse(), parse(), ctoon::parse(), and parse().

◆ parse() [3/4]

static document ctoon::document::parse ( const std::string &  toon,
read_flag  flags = read_flag::NOFLAG 
)
inlinestatic

Definition at line 571 of file ctoon.hpp.

References parse().

◆ parse() [4/4]

static document ctoon::document::parse ( const string_view &  toon,
read_flag  flags = read_flag::NOFLAG 
)
inlinestatic

Definition at line 574 of file ctoon.hpp.

References parse().

◆ parse_file()

static document ctoon::document::parse_file ( const char *  path,
read_flag  flags = read_flag::NOFLAG 
)
inlinestatic

Definition at line 595 of file ctoon.hpp.

References document(), and ctoon::to_c().

Referenced by ctoon::parse_file().

◆ parse_indent() [1/3]

static document ctoon::document::parse_indent ( const char *  toon,
std::size_t  len,
int  indent_size,
read_flag  flags = read_flag::NOFLAG 
)
inlinestatic

Definition at line 579 of file ctoon.hpp.

References document(), and ctoon::to_c().

Referenced by parse_indent(), and parse_indent().

◆ parse_indent() [2/3]

static document ctoon::document::parse_indent ( const std::string &  toon,
int  indent_size,
read_flag  flags = read_flag::NOFLAG 
)
inlinestatic

Definition at line 587 of file ctoon.hpp.

References parse_indent().

◆ parse_indent() [3/3]

static document ctoon::document::parse_indent ( const string_view &  toon,
int  indent_size,
read_flag  flags = read_flag::NOFLAG 
)
inlinestatic

Definition at line 591 of file ctoon.hpp.

References parse_indent().

◆ raw()

ctoon_doc * ctoon::document::raw ( ) const
inline

Definition at line 632 of file ctoon.hpp.

References doc_.

Referenced by to_string().

◆ read_size()

std::size_t ctoon::document::read_size ( ) const
inline

Definition at line 633 of file ctoon.hpp.

References doc_.

◆ release()

ctoon_doc * ctoon::document::release ( )
inline

Definition at line 683 of file ctoon.hpp.

References doc_.

◆ root()

value ctoon::document::root ( ) const
inline

Definition at line 630 of file ctoon.hpp.

References doc_.

Referenced by operator*().

◆ to_string()

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

Definition at line 641 of file ctoon.hpp.

References doc_, and raw().

Referenced by ctoon::to_string().

◆ val_count()

std::size_t ctoon::document::val_count ( ) const
inline

Definition at line 634 of file ctoon.hpp.

References doc_.

◆ valid()

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

Definition at line 628 of file ctoon.hpp.

References doc_.

Referenced by operator unsigned char().

◆ write_file()

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

Definition at line 649 of file ctoon.hpp.

References doc_.

Member Data Documentation

◆ doc_

ctoon_doc* ctoon::document::doc_

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