Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
skjson::BoolValue Class Referencefinal

#include <SkJSON.h>

Inheritance diagram for skjson::BoolValue:
skjson::Value

Public Member Functions

 BoolValue (bool)
 
bool operator* () const
 
- Public Member Functions inherited from skjson::Value
Type getType () const
 
template<typename T >
bool is () const
 
template<typename T >
const Tas () const
 
template<typename T >
 operator const T * () const
 
SkString toString () const
 
const Valueoperator[] (const char *key) const
 

Static Public Attributes

static constexpr Type kType = Type::kBool
 

Additional Inherited Members

- Public Types inherited from skjson::Value
enum class  Type {
  kNull , kBool , kNumber , kString ,
  kArray , kObject
}
 
- Protected Types inherited from skjson::Value
enum class  Tag : uint8_t {
  kShortString = 0b00000000 , kNull = 0b00000001 , kBool = 0b00000010 , kInt = 0b00000011 ,
  kFloat = 0b00000100 , kString = 0b00000101 , kArray = 0b00000110 , kObject = 0b00000111
}
 
- Protected Member Functions inherited from skjson::Value
void init_tagged (Tag)
 
void init_tagged_pointer (Tag, void *)
 
Tag getTag () const
 
template<typename T >
const Tcast () const
 
template<typename T >
Tcast ()
 
template<typename T >
const Tptr () const
 
- Static Protected Attributes inherited from skjson::Value
static constexpr uint8_t kTagMask = 0b00000111
 

Detailed Description

Definition at line 227 of file SkJSON.h.

Constructor & Destructor Documentation

◆ BoolValue()

skjson::BoolValue::BoolValue ( bool  b)
explicit

Definition at line 67 of file SkJSON.cpp.

67 {
69 *this->cast<bool>() = b;
70 SkASSERT(this->getTag() == Tag::kBool);
71}
#define SkASSERT(cond)
Definition SkAssert.h:116
Tag getTag() const
Definition SkJSON.h:148
void init_tagged(Tag)
Definition SkJSON.cpp:38
static bool b

Member Function Documentation

◆ operator*()

bool skjson::BoolValue::operator* ( ) const
inline

Definition at line 233 of file SkJSON.h.

233 {
234 SkASSERT(this->getTag() == Tag::kBool);
235 return *this->cast<bool>();
236 }

Member Data Documentation

◆ kType

constexpr Type skjson::BoolValue::kType = Type::kBool
inlinestaticconstexpr

Definition at line 229 of file SkJSON.h.


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