MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::Ref Class Reference

Helper class to retrieve Infer::arg if present. More...

#include <mim/def.h>

Public Member Functions

 Ref ()=default
 
 Ref (const Def *def)
 
const Defoperator* () const
 
const Defoperator-> () const
 
 operator const Def * () const
 
 operator bool () const
 
const Defdef () const
 Retrieve wrapped Def without Infer::refering.
 

Static Public Member Functions

static const Defrefer (const Def *def)
 Same as Infer::find but does nothing if def is nullptr.
 

Friends

std::ostream & operator<< (std::ostream &os, Ref ref)
 

Detailed Description

Helper class to retrieve Infer::arg if present.

Definition at line 86 of file def.h.

Constructor & Destructor Documentation

◆ Ref() [1/2]

mim::Ref::Ref ( )
default

◆ Ref() [2/2]

mim::Ref::Ref ( const Def * def)
inline

Definition at line 89 of file def.h.

Member Function Documentation

◆ def()

const Def * mim::Ref::def ( ) const
inline

Retrieve wrapped Def without Infer::refering.

Definition at line 97 of file def.h.

Referenced by refer().

◆ operator bool()

mim::Ref::operator bool ( ) const
inlineexplicit

Definition at line 95 of file def.h.

◆ operator const Def *()

mim::Ref::operator const Def * ( ) const
inline

Definition at line 94 of file def.h.

References refer().

◆ operator*()

const Def * mim::Ref::operator* ( ) const
inline

Definition at line 92 of file def.h.

References refer().

◆ operator->()

const Def * mim::Ref::operator-> ( ) const
inline

Definition at line 93 of file def.h.

References refer().

◆ refer()

const Def * mim::Ref::refer ( const Def * def)
static

Same as Infer::find but does nothing if def is nullptr.

Definition at line 29 of file check.cpp.

References def(), and mim::Infer::find().

Referenced by operator const Def *(), operator*(), and operator->().

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
Ref ref )
friend

Definition at line 420 of file dump.cpp.


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