Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::TaggedValue Class Reference

#include <tagged_value.hpp>

Public Types

using value_type = std::variant< uint8_t, uint1_t, uint16_t, uint32_t, uint64_t, uint128_t, FF >
 

Public Member Functions

 TaggedValue ()=default
 
TaggedValue operator+ (const TaggedValue &other) const
 
TaggedValue operator- (const TaggedValue &other) const
 
TaggedValue operator* (const TaggedValue &other) const
 
TaggedValue operator/ (const TaggedValue &other) const
 
TaggedValue operator& (const TaggedValue &other) const
 
TaggedValue operator| (const TaggedValue &other) const
 
TaggedValue operator^ (const TaggedValue &other) const
 
TaggedValue operator~ () const
 
TaggedValue operator<< (const TaggedValue &other) const
 
TaggedValue operator>> (const TaggedValue &other) const
 
bool operator< (const TaggedValue &other) const
 
bool operator<= (const TaggedValue &other) const
 
bool operator== (const TaggedValue &other) const
 
bool operator!= (const TaggedValue &other) const
 
FF as_ff () const
 
 operator FF () const
 
ValueTag get_tag () const
 
std::string to_string () const
 
template<typename T >
as () const
 
std::size_t hash () const noexcept
 

Static Public Member Functions

template<typename T >
static TaggedValue from (T value)
 
static TaggedValue from_tag (ValueTag tag, FF value)
 
static TaggedValue from_tag_truncating (ValueTag tag, FF value)
 

Private Member Functions

 TaggedValue (value_type value)
 

Private Attributes

value_type value
 

Detailed Description

Definition at line 70 of file tagged_value.hpp.

Member Typedef Documentation

◆ value_type

using bb::avm2::TaggedValue::value_type = std::variant<uint8_t, uint1_t, uint16_t, uint32_t, uint64_t, uint128_t, FF>

Definition at line 76 of file tagged_value.hpp.

Constructor & Destructor Documentation

◆ TaggedValue() [1/2]

bb::avm2::TaggedValue::TaggedValue ( )
default

◆ TaggedValue() [2/2]

bb::avm2::TaggedValue::TaggedValue ( TaggedValue::value_type  value_)
private

Definition at line 212 of file tagged_value.cpp.

Member Function Documentation

◆ as()

template<typename T >
T bb::avm2::TaggedValue::as ( ) const
inline

Definition at line 115 of file tagged_value.hpp.

◆ as_ff()

FF bb::avm2::TaggedValue::as_ff ( ) const

Definition at line 351 of file tagged_value.cpp.

◆ from()

template<typename T >
static TaggedValue bb::avm2::TaggedValue::from ( value)
inlinestatic

Definition at line 82 of file tagged_value.hpp.

◆ from_tag()

TaggedValue bb::avm2::TaggedValue::from_tag ( ValueTag  tag,
FF  value 
)
static

Definition at line 216 of file tagged_value.cpp.

◆ from_tag_truncating()

TaggedValue bb::avm2::TaggedValue::from_tag_truncating ( ValueTag  tag,
FF  value 
)
static

Definition at line 251 of file tagged_value.cpp.

◆ get_tag()

ValueTag bb::avm2::TaggedValue::get_tag ( ) const

Definition at line 361 of file tagged_value.cpp.

◆ hash()

std::size_t bb::avm2::TaggedValue::hash ( ) const
inlinenoexcept

Definition at line 124 of file tagged_value.hpp.

◆ operator FF()

bb::avm2::TaggedValue::operator FF ( ) const
inline

Definition at line 110 of file tagged_value.hpp.

◆ operator!=()

bool bb::avm2::TaggedValue::operator!= ( const TaggedValue other) const

Definition at line 345 of file tagged_value.cpp.

◆ operator&()

TaggedValue bb::avm2::TaggedValue::operator& ( const TaggedValue other) const

Definition at line 295 of file tagged_value.cpp.

◆ operator*()

TaggedValue bb::avm2::TaggedValue::operator* ( const TaggedValue other) const

Definition at line 284 of file tagged_value.cpp.

◆ operator+()

TaggedValue bb::avm2::TaggedValue::operator+ ( const TaggedValue other) const

Definition at line 274 of file tagged_value.cpp.

◆ operator-()

TaggedValue bb::avm2::TaggedValue::operator- ( const TaggedValue other) const

Definition at line 279 of file tagged_value.cpp.

◆ operator/()

TaggedValue bb::avm2::TaggedValue::operator/ ( const TaggedValue other) const

Definition at line 289 of file tagged_value.cpp.

◆ operator<()

bool bb::avm2::TaggedValue::operator< ( const TaggedValue other) const

Definition at line 327 of file tagged_value.cpp.

◆ operator<<()

TaggedValue bb::avm2::TaggedValue::operator<< ( const TaggedValue other) const

Definition at line 316 of file tagged_value.cpp.

◆ operator<=()

bool bb::avm2::TaggedValue::operator<= ( const TaggedValue other) const

Definition at line 333 of file tagged_value.cpp.

◆ operator==()

bool bb::avm2::TaggedValue::operator== ( const TaggedValue other) const

Definition at line 339 of file tagged_value.cpp.

◆ operator>>()

TaggedValue bb::avm2::TaggedValue::operator>> ( const TaggedValue other) const

Definition at line 321 of file tagged_value.cpp.

◆ operator^()

TaggedValue bb::avm2::TaggedValue::operator^ ( const TaggedValue other) const

Definition at line 305 of file tagged_value.cpp.

◆ operator|()

TaggedValue bb::avm2::TaggedValue::operator| ( const TaggedValue other) const

Definition at line 300 of file tagged_value.cpp.

◆ operator~()

TaggedValue bb::avm2::TaggedValue::operator~ ( ) const

Definition at line 310 of file tagged_value.cpp.

◆ to_string()

std::string bb::avm2::TaggedValue::to_string ( ) const

Definition at line 386 of file tagged_value.cpp.

Member Data Documentation

◆ value

value_type bb::avm2::TaggedValue::value
private

Definition at line 128 of file tagged_value.hpp.


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