Yume
Public Member Functions | Public Attributes | List of all members
yume::GenericValue Struct Reference

#include <substitution.hpp>

Collaboration diagram for yume::GenericValue:
Collaboration graph
[legend]

Public Member Functions

 GenericValue ()=default
 
 GenericValue (ty::Type type)
 
 GenericValue (nonnull< ast::Expr * > expr)
 
auto unassigned () const -> bool
 
auto holds_type () const -> bool
 
auto holds_expr () const -> bool
 
auto as_type () const &-> const ty::Type &
 
auto as_expr () const &-> const ast::Expr *
 
auto unsubstituted_primary () const -> bool
 
auto unassigned_or_unsubstituted () const -> bool
 
auto name () const -> string
 
auto operator== (const GenericValue &other) const noexcept -> bool
 

Public Attributes

optional< ty::Typetype {}
 
nullable< ast::Expr * > expr {}
 

Detailed Description

Definition at line 32 of file substitution.hpp.

Constructor & Destructor Documentation

◆ GenericValue() [1/3]

yume::GenericValue::GenericValue ( )
default

◆ GenericValue() [2/3]

yume::GenericValue::GenericValue ( ty::Type  type)
inline

Definition at line 37 of file substitution.hpp.

◆ GenericValue() [3/3]

yume::GenericValue::GenericValue ( nonnull< ast::Expr * >  expr)
inline

Definition at line 38 of file substitution.hpp.

Member Function Documentation

◆ as_expr()

auto yume::GenericValue::as_expr ( ) const & -> const ast::Expr*
inline

Definition at line 48 of file substitution.hpp.

References expr.

◆ as_type()

auto yume::GenericValue::as_type ( ) const & -> const ty::Type&
inline

Definition at line 44 of file substitution.hpp.

References type, and YUME_ASSERT.

◆ holds_expr()

auto yume::GenericValue::holds_expr ( ) const -> bool
inline

Definition at line 42 of file substitution.hpp.

References expr.

◆ holds_type()

auto yume::GenericValue::holds_type ( ) const -> bool
inline

Definition at line 41 of file substitution.hpp.

References type.

◆ name()

auto yume::GenericValue::name ( ) const -> string
inline

Definition at line 54 of file substitution.hpp.

References expr, type, and unassigned().

◆ operator==()

auto yume::GenericValue::operator== ( const GenericValue other) const -> bool
inlinenoexcept

Definition at line 62 of file substitution.hpp.

References expr, and type.

◆ unassigned()

auto yume::GenericValue::unassigned ( ) const -> bool
inline

Definition at line 40 of file substitution.hpp.

References expr, and type.

Referenced by name(), and unassigned_or_unsubstituted().

◆ unassigned_or_unsubstituted()

auto yume::GenericValue::unassigned_or_unsubstituted ( ) const -> bool
inline

Definition at line 52 of file substitution.hpp.

References unassigned(), and unsubstituted_primary().

Referenced by yume::Substitutions::fully_substituted().

◆ unsubstituted_primary()

auto yume::GenericValue::unsubstituted_primary ( ) const -> bool
inline

Definition at line 50 of file substitution.hpp.

References type.

Referenced by unassigned_or_unsubstituted().

Member Data Documentation

◆ expr

nullable<ast::Expr*> yume::GenericValue::expr {}

Definition at line 34 of file substitution.hpp.

Referenced by as_expr(), holds_expr(), name(), operator==(), and unassigned().

◆ type

optional<ty::Type> yume::GenericValue::type {}

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