Impulse Graph C++ Engine 2.4.0
High-Performance Zero-Copy C-ABI Kernel and C++20 Fluent VM Engine
Loading...
Searching...
No Matches
impulse::cel::CelValue Struct Reference

Typed value with Kleene 3-valued NULL semantics (Spec v0.10.0). More...

#include <impulse_cel.h>

Public Types

enum class  Kind : uint8_t {
  Null = 0 , Bool , Int64 , Uint64 ,
  Double , String
}

Public Member Functions

bool is_null () const
std::string_view as_string_view () const
bool to_double (double &out) const
bool to_int64 (int64_t &out) const
int to_tribool () const

Static Public Member Functions

static CelValue make_null ()
static CelValue make_bool (bool b)
static CelValue make_int (int64_t x)
static CelValue make_uint (uint64_t x)
static CelValue make_double (double x)
static CelValue make_string_view (std::string_view sv)
static CelValue make_string (std::string s)

Public Attributes

Kind kind = Kind::Null
bool bool_val = false
bool uses_owned_str = false
int64_t int_val = 0
uint64_t uint_val = 0
double dbl_val = 0.0
std::string_view str_view {}
std::string str_owned {}

Detailed Description

Typed value with Kleene 3-valued NULL semantics (Spec v0.10.0).

Member Enumeration Documentation

◆ Kind

enum class impulse::cel::CelValue::Kind : uint8_t
strong
Enumerator
Null 
Bool 
Int64 
Uint64 
Double 
String 

Member Function Documentation

◆ as_string_view()

std::string_view impulse::cel::CelValue::as_string_view ( ) const
inline

◆ is_null()

bool impulse::cel::CelValue::is_null ( ) const
inline

◆ make_bool()

CelValue impulse::cel::CelValue::make_bool ( bool b)
inlinestatic

◆ make_double()

CelValue impulse::cel::CelValue::make_double ( double x)
inlinestatic

◆ make_int()

CelValue impulse::cel::CelValue::make_int ( int64_t x)
inlinestatic

◆ make_null()

CelValue impulse::cel::CelValue::make_null ( )
inlinestatic

◆ make_string()

CelValue impulse::cel::CelValue::make_string ( std::string s)
inlinestatic

◆ make_string_view()

CelValue impulse::cel::CelValue::make_string_view ( std::string_view sv)
inlinestatic

◆ make_uint()

CelValue impulse::cel::CelValue::make_uint ( uint64_t x)
inlinestatic

◆ to_double()

bool impulse::cel::CelValue::to_double ( double & out) const
inline

◆ to_int64()

bool impulse::cel::CelValue::to_int64 ( int64_t & out) const
inline

◆ to_tribool()

int impulse::cel::CelValue::to_tribool ( ) const
inline

Member Data Documentation

◆ bool_val

bool impulse::cel::CelValue::bool_val = false

◆ dbl_val

double impulse::cel::CelValue::dbl_val = 0.0

◆ int_val

int64_t impulse::cel::CelValue::int_val = 0

◆ kind

Kind impulse::cel::CelValue::kind = Kind::Null

◆ str_owned

std::string impulse::cel::CelValue::str_owned {}

◆ str_view

std::string_view impulse::cel::CelValue::str_view {}

◆ uint_val

uint64_t impulse::cel::CelValue::uint_val = 0

◆ uses_owned_str

bool impulse::cel::CelValue::uses_owned_str = false

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