Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
dart::BoolParameter Class Reference
Inheritance diagram for dart::BoolParameter:
dart::MethodParameter

Public Member Functions

 BoolParameter (const char *name, bool required)
 
virtual bool Validate (const char *value) const
 
- Public Member Functions inherited from dart::MethodParameter
 MethodParameter (const char *name, bool required)
 
virtual ~MethodParameter ()
 
virtual bool Validate (const char *value) const
 
virtual bool ValidateObject (const Object &value) const
 
const char * name () const
 
bool required () const
 
virtual void PrintError (const char *name, const char *value, JSONStream *js) const
 
virtual void PrintErrorObject (const char *name, const Object &value, JSONStream *js) const
 

Static Public Member Functions

static bool Parse (const char *value, bool default_value=false)
 

Detailed Description

Definition at line 702 of file service.cc.

Constructor & Destructor Documentation

◆ BoolParameter()

dart::BoolParameter::BoolParameter ( const char *  name,
bool  required 
)
inline

Definition at line 704 of file service.cc.

const char * name() const
Definition: service.cc:147
MethodParameter(const char *name, bool required)
Definition: service.cc:138
bool required() const
Definition: service.cc:149

Member Function Documentation

◆ Parse()

static bool dart::BoolParameter::Parse ( const char *  value,
bool  default_value = false 
)
inlinestatic

Definition at line 714 of file service.cc.

714 {
715 if (value == nullptr) {
716 return default_value;
717 }
718 return strcmp("true", value) == 0;
719 }
uint8_t value

◆ Validate()

virtual bool dart::BoolParameter::Validate ( const char *  value) const
inlinevirtual

Reimplemented from dart::MethodParameter.

Definition at line 707 of file service.cc.

707 {
708 if (value == nullptr) {
709 return false;
710 }
711 return (strcmp("true", value) == 0) || (strcmp("false", value) == 0);
712 }

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