Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
base::internal::RangeCheck Class Reference

#include <safe_conversions_impl.h>

Public Member Functions

constexpr RangeCheck (bool is_in_lower_bound, bool is_in_upper_bound)
 
constexpr RangeCheck ()
 
constexpr bool IsValid () const
 
constexpr bool IsInvalid () const
 
constexpr bool IsOverflow () const
 
constexpr bool IsUnderflow () const
 
constexpr bool IsOverflowFlagSet () const
 
constexpr bool IsUnderflowFlagSet () const
 
constexpr bool operator== (const RangeCheck rhs) const
 
constexpr bool operator!= (const RangeCheck rhs) const
 

Detailed Description

Definition at line 191 of file safe_conversions_impl.h.

Constructor & Destructor Documentation

◆ RangeCheck() [1/2]

constexpr base::internal::RangeCheck::RangeCheck ( bool  is_in_lower_bound,
bool  is_in_upper_bound 
)
inlineconstexpr

Definition at line 193 of file safe_conversions_impl.h.

194 : is_underflow_(!is_in_lower_bound), is_overflow_(!is_in_upper_bound) {}

◆ RangeCheck() [2/2]

constexpr base::internal::RangeCheck::RangeCheck ( )
inlineconstexpr

Definition at line 195 of file safe_conversions_impl.h.

195: is_underflow_(0), is_overflow_(0) {}

Member Function Documentation

◆ IsInvalid()

constexpr bool base::internal::RangeCheck::IsInvalid ( ) const
inlineconstexpr

Definition at line 197 of file safe_conversions_impl.h.

197{ return is_overflow_ && is_underflow_; }

◆ IsOverflow()

constexpr bool base::internal::RangeCheck::IsOverflow ( ) const
inlineconstexpr

Definition at line 198 of file safe_conversions_impl.h.

198{ return is_overflow_ && !is_underflow_; }

◆ IsOverflowFlagSet()

constexpr bool base::internal::RangeCheck::IsOverflowFlagSet ( ) const
inlineconstexpr

Definition at line 200 of file safe_conversions_impl.h.

200{ return is_overflow_; }

◆ IsUnderflow()

constexpr bool base::internal::RangeCheck::IsUnderflow ( ) const
inlineconstexpr

Definition at line 199 of file safe_conversions_impl.h.

199{ return !is_overflow_ && is_underflow_; }

◆ IsUnderflowFlagSet()

constexpr bool base::internal::RangeCheck::IsUnderflowFlagSet ( ) const
inlineconstexpr

Definition at line 201 of file safe_conversions_impl.h.

201{ return is_underflow_; }

◆ IsValid()

constexpr bool base::internal::RangeCheck::IsValid ( ) const
inlineconstexpr

Definition at line 196 of file safe_conversions_impl.h.

196{ return !is_overflow_ && !is_underflow_; }

◆ operator!=()

constexpr bool base::internal::RangeCheck::operator!= ( const RangeCheck  rhs) const
inlineconstexpr

Definition at line 206 of file safe_conversions_impl.h.

206 {
207 return !(*this == rhs);
208 }

◆ operator==()

constexpr bool base::internal::RangeCheck::operator== ( const RangeCheck  rhs) const
inlineconstexpr

Definition at line 202 of file safe_conversions_impl.h.

202 {
203 return is_underflow_ == rhs.is_underflow_ &&
204 is_overflow_ == rhs.is_overflow_;
205 }

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