tipc
A TIP to LLVM compiler
Public Member Functions | Protected Member Functions | List of all members
TipFunction Class Reference

A proper type representing a function. More...

#include <TipFunction.h>

Inheritance diagram for TipFunction:
Inheritance graph
[legend]
Collaboration diagram for TipFunction:
Collaboration graph
[legend]

Public Member Functions

 TipFunction ()=delete
 
 TipFunction (std::vector< std::shared_ptr< TipType >> params, std::shared_ptr< TipType > ret)
 
std::vector< std::shared_ptr< TipType > > getParamTypes () const
 
std::shared_ptr< TipTypegetReturnType () const
 
bool operator== (const TipType &other) const override
 
bool operator!= (const TipType &other) const override
 
void accept (TipTypeVisitor *visitor) override
 
- Public Member Functions inherited from TipCons
 TipCons ()=default
 
const std::vector< std::shared_ptr< TipType > > & getArguments () const
 
void setArguments (std::vector< std::shared_ptr< TipType >> &args)
 
virtual int arity () const
 
bool doMatch (TipType const *t) const
 Check for dynamic subtype and artity agreement We explicitly test the types here which is not robust to the addition of new subtypes of TipCons. Extend this if you add such a subtype. More...
 
- Public Member Functions inherited from TipType
virtual ~TipType ()=default
 

Protected Member Functions

std::ostream & print (std::ostream &out) const override
 
- Protected Member Functions inherited from TipCons
 TipCons (std::vector< std::shared_ptr< TipType >> arguments)
 

Additional Inherited Members

- Protected Attributes inherited from TipCons
std::vector< std::shared_ptr< TipType > > arguments
 

Detailed Description

A proper type representing a function.

Constructor & Destructor Documentation

◆ TipFunction() [1/2]

TipFunction::TipFunction ( )
delete

◆ TipFunction() [2/2]

TipFunction::TipFunction ( std::vector< std::shared_ptr< TipType >>  params,
std::shared_ptr< TipType ret 
)

Member Function Documentation

◆ accept()

void TipFunction::accept ( TipTypeVisitor visitor)
overridevirtual

Implements TipType.

◆ getParamTypes()

std::vector< std::shared_ptr< TipType > > TipFunction::getParamTypes ( ) const

◆ getReturnType()

std::shared_ptr< TipType > TipFunction::getReturnType ( ) const

◆ operator!=()

bool TipFunction::operator!= ( const TipType other) const
overridevirtual

Implements TipType.

◆ operator==()

bool TipFunction::operator== ( const TipType other) const
overridevirtual

Implements TipType.

◆ print()

std::ostream & TipFunction::print ( std::ostream &  out) const
overrideprotectedvirtual

Implements TipType.


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