fson  1.0.2
A comment-preserving C++ library for FSON — a human-friendly superset of JSON / JSON5
fedem::fson::Boolean Class Referencefinal

#include <Boolean.hh>

+ Inheritance diagram for fedem::fson::Boolean:
+ Collaboration diagram for fedem::fson::Boolean:

Public Member Functions

 Boolean (bool value=false) noexcept
 
Type getType () const noexcept override
 
std::unique_ptr< Valueclone () const override
 
BooleanasBoolean () noexcept override
 
Boolean const * asBoolean () const noexcept override
 
bool getValue () const noexcept
 
void setValue (bool value) noexcept
 
- Public Member Functions inherited from fedem::fson::Value
virtual ~Value ()
 
bool isNull () const noexcept
 
bool isBoolean () const noexcept
 
bool isNumber () const noexcept
 
bool isString () const noexcept
 
bool isArray () const noexcept
 
bool isObject () const noexcept
 
virtual NullasNull () noexcept
 
virtual Null const * asNull () const noexcept
 
virtual NumberasNumber () noexcept
 
virtual Number const * asNumber () const noexcept
 
virtual StringasString () noexcept
 
virtual String const * asString () const noexcept
 
virtual ArrayasArray () noexcept
 
virtual Array const * asArray () const noexcept
 
virtual ObjectasObject () noexcept
 
virtual Object const * asObject () const noexcept
 

Private Attributes

bool value
 

Additional Inherited Members

- Public Types inherited from fedem::fson::Value
enum class  Type {
  Null , Boolean , Number , String ,
  Array , Object
}
 
- Protected Member Functions inherited from fedem::fson::Value
 Value ()=default
 

Constructor & Destructor Documentation

◆ Boolean()

fedem::fson::Boolean::Boolean ( bool  value = false)
inlineexplicitnoexcept

Member Function Documentation

◆ getType()

Value::Type fedem::fson::Boolean::getType ( ) const
inlineoverridevirtualnoexcept

◆ clone()

std::unique_ptr< Value > fedem::fson::Boolean::clone ( ) const
inlineoverridevirtual

Implements fedem::fson::Value.

References value.

◆ asBoolean() [1/2]

Boolean * fedem::fson::Boolean::asBoolean ( )
inlineoverridevirtualnoexcept

Reimplemented from fedem::fson::Value.

◆ asBoolean() [2/2]

Boolean const * fedem::fson::Boolean::asBoolean ( ) const
inlineoverridevirtualnoexcept

Reimplemented from fedem::fson::Value.

◆ getValue()

bool fedem::fson::Boolean::getValue ( ) const
inlinenoexcept

References value.

Referenced by fedem::fson::Object::getBoolean(), and fedem::fson::FsonWriter::writeValue().

+ Here is the caller graph for this function:

◆ setValue()

void fedem::fson::Boolean::setValue ( bool  value)
inlinenoexcept

Member Data Documentation

◆ value

bool fedem::fson::Boolean::value
private

Referenced by clone(), and getValue().


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