|
rapidyaml
0.10.0
parse and emit YAML, and do it fast
|
an owning string class used by the yaml std event handler (and the YamlScript handler). More...
#include <string.hpp>
Public Types | |
| enum | : id_type { sso_size = RYML_STRING_SSO_SIZE } |
Public Member Functions | |
| string () | |
| ~string () noexcept | |
| string (string const &that) RYML_NOEXCEPT | |
| string (string &&that) noexcept | |
| string & | operator= (string const &that) RYML_NOEXCEPT |
| string & | operator= (string &&that) noexcept |
| operator csubstr () const noexcept | |
| operator substr () noexcept | |
| const char * | data () const noexcept |
| id_type | size () const noexcept |
| id_type | capacity () const noexcept |
| void | clear () |
| void | resize (id_type sz) |
| void | reserve (id_type sz) |
| void | append (char c) |
| void | append (csubstr cs) |
| void | insert (char c, id_type pos) |
| void | insert (csubstr cs, id_type pos) |
| size_t | find_last (csubstr pattern) RYML_NOEXCEPT |
| void | _free () |
| void | _cp (string const *that) |
| void | _mv (string *that) |
Public Attributes | |
| char | m_buf [sso_size] |
| char * | m_str |
| id_type | m_size |
| id_type | m_capacity |
an owning string class used by the yaml std event handler (and the YamlScript handler).
we use this instead of std::string because: 1) this spares the dependency on the standard library 2) enables possibility of adding borrowing semantics (in the future)
Definition at line 32 of file string.hpp.
| anonymous enum : id_type |
| Enumerator | |
|---|---|
| sso_size | |
Definition at line 34 of file string.hpp.
|
inline |
Definition at line 42 of file string.hpp.
|
inlinenoexcept |
Definition at line 48 of file string.hpp.
References _free().
|
inline |
Definition at line 53 of file string.hpp.
|
inlinenoexcept |
Definition at line 71 of file string.hpp.
References _mv().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 85 of file string.hpp.
References m_size.
Referenced by c4::yml::extra::EventHandlerTestSuite::alloc_arena(), and c4::yml::extra::append_scalar_escaped().
|
inlinenoexcept |
Definition at line 86 of file string.hpp.
References m_capacity.
Referenced by c4::yml::extra::append_scalar_escaped().
|
inline |
Definition at line 88 of file string.hpp.
References m_size.
Referenced by c4::yml::extra::EventHandlerTestSuite::reset().
|
inline |
Definition at line 93 of file string.hpp.
References m_size, and reserve().
Referenced by string(), c4::yml::extra::EventHandlerTestSuite::alloc_arena(), c4::yml::extra::append_scalar_escaped(), operator=(), and c4::yml::extra::EventHandlerTestSuite::reset().
|
inline |
Definition at line 99 of file string.hpp.
References c4::yml::get_callbacks(), m_buf, m_capacity, m_size, m_str, and sso_size.
Referenced by append(), insert(), c4::yml::extra::EventHandlerTestSuite::reset(), and resize().
|
inline |
Definition at line 121 of file string.hpp.
References m_capacity, m_size, m_str, and reserve().
Referenced by insert().
|
inline |
|
inline |
Definition at line 138 of file string.hpp.
References append(), m_capacity, m_size, m_str, and reserve().
Referenced by c4::yml::extra::EventHandlerTestSuite::actually_val_is_first_key_of_new_map_block().
|
inline |
Definition at line 155 of file string.hpp.
References append(), m_capacity, m_size, m_str, and reserve().
|
inline |
Definition at line 176 of file string.hpp.
References m_size, m_str, and c4::yml::npos.
Referenced by c4::yml::extra::EventHandlerTestSuite::actually_val_is_first_key_of_new_map_block().
|
inline |
Definition at line 204 of file string.hpp.
References c4::yml::get_callbacks(), m_buf, m_capacity, m_size, m_str, and sso_size.
Referenced by ~string().
|
inline |
Definition at line 217 of file string.hpp.
References m_capacity, m_size, m_str, and sso_size.
Referenced by string(), and operator=().
|
inline |
Definition at line 236 of file string.hpp.
References m_buf, m_capacity, m_size, m_str, and sso_size.
Referenced by string(), and operator=().
| char c4::yml::extra::string::m_buf[sso_size] |
Definition at line 35 of file string.hpp.
| char* c4::yml::extra::string::m_str |
Definition at line 36 of file string.hpp.
Referenced by _cp(), _free(), _mv(), append(), data(), find_last(), insert(), operator csubstr(), operator substr(), and reserve().
| id_type c4::yml::extra::string::m_size |
Definition at line 37 of file string.hpp.
Referenced by _cp(), _free(), _mv(), append(), clear(), find_last(), insert(), operator csubstr(), operator substr(), reserve(), resize(), and size().
| id_type c4::yml::extra::string::m_capacity |
Definition at line 38 of file string.hpp.
Referenced by _cp(), _free(), _mv(), append(), capacity(), insert(), and reserve().