#include <SkJSON.h>
|
enum class | Type {
kNull
, kBool
, kNumber
, kString
,
kArray
, kObject
} |
|
enum class | Tag : uint8_t {
kShortString = 0b00000000
, kNull = 0b00000001
, kBool = 0b00000010
, kInt = 0b00000011
,
kFloat = 0b00000100
, kString = 0b00000101
, kArray = 0b00000110
, kObject = 0b00000111
} |
|
void | init_tagged (Tag) |
|
void | init_tagged_pointer (Tag, void *) |
|
Tag | getTag () const |
|
template<typename T > |
const T * | cast () const |
|
template<typename T > |
T * | cast () |
|
template<typename T > |
const T * | ptr () const |
|
static constexpr uint8_t | kTagMask = 0b00000111 |
|
Definition at line 292 of file SkJSON.h.
◆ StringValue() [1/3]
skjson::StringValue::StringValue |
( |
| ) |
|
◆ StringValue() [2/3]
skjson::StringValue::StringValue |
( |
const char * |
src, |
|
|
SkArenaAlloc & |
alloc |
|
) |
| |
◆ StringValue() [3/3]
skjson::StringValue::StringValue |
( |
const char * |
src, |
|
|
size_t |
size, |
|
|
SkArenaAlloc & |
alloc |
|
) |
| |
◆ begin()
const char * skjson::StringValue::begin |
( |
| ) |
const |
|
inline |
Definition at line 315 of file SkJSON.h.
315 {
317 ? this->cast<char>()
319 }
const char * begin() const
◆ end()
const char * skjson::StringValue::end |
( |
| ) |
const |
|
inline |
Definition at line 321 of file SkJSON.h.
321 {
323 ? strchr(this->cast<char>(), '\0')
325 }
◆ size()
size_t skjson::StringValue::size |
( |
| ) |
const |
|
inline |
Definition at line 300 of file SkJSON.h.
300 {
303
304
305
306
307 return strlen(this->cast<char>());
309 return this->cast<VectorValue<char, Value::Type::kString>>()->
size();
310 default:
311 return 0;
312 }
313 }
◆ str()
std::string_view skjson::StringValue::str |
( |
| ) |
const |
|
inline |
Definition at line 327 of file SkJSON.h.
327 {
328 return std::string_view(this->
begin(), this->
size());
329 }
◆ kType
The documentation for this class was generated from the following files: