The Psyche Project
Classes | Public Member Functions | Protected Member Functions | List of all members
psy::C::Function Class Referencefinal

The FunctionSymbol class. More...

#include <Declaration_Function.h>

Inheritance diagram for psy::C::Function:
psy::C::Declaration psy::C::MIXIN_NameableSymbol psy::C::MIXIN_TypeableSymbol psy::C::Symbol

Classes

struct  FunctionSymbolImpl
 

Public Member Functions

virtual const Identifier * identifier () const override
 
const Identifier * name () const
 
const Type * type () const
 
const Type * returnType () const
 
virtual std::string toDisplayString () const override
 
virtual Function * asFunction () override
 
virtual const Function * asFunction () const override
 
- Public Member Functions inherited from psy::C::Declaration
DeclarationKind kind () const
 
const Scope * enclosingScope () const
 
const NameSpace nameSpace () const
 
std::vector< SyntaxReference > declaringSyntaxReferences () const
 
Location location () const
 
virtual Declaration * asDeclaration () override
 
virtual const Declaration * asDeclaration () const override
 
virtual ObjectDeclaration * asObjectDeclaration ()
 
virtual const ObjectDeclaration * asObjectDeclaration () const
 
virtual TypeDeclaration * asTypeDeclaration ()
 
virtual const TypeDeclaration * asTypeDeclaration () const
 
- Public Member Functions inherited from psy::C::Symbol
SymbolKind kind () const
 
virtual Program * asProgram ()
 
virtual const Program * asProgram () const
 
virtual TranslationUnit * asTranslationUnit ()
 
virtual const TranslationUnit * asTranslationUnit () const
 
const Symbol * containingSymbol () const
 

Protected Member Functions

FunctionSymbolImpl * CAST () const
 
- Protected Member Functions inherited from psy::C::Declaration
 Declaration (SymbolImpl *p, DeclarationKind declK)
 
 Declaration (const Declaration &)=delete
 
Declaration & operator= (const Declaration &)=delete
 
- Protected Member Functions inherited from psy::C::Symbol
 Symbol (SymbolImpl *p)
 
 Symbol (const Symbol &)=delete
 
Symbol & operator= (const Symbol &)=delete
 

Additional Inherited Members

- Protected Attributes inherited from psy::C::Symbol
std::unique_ptr< SymbolImpl > impl_
 

Detailed Description

The FunctionSymbol class.

Note
This API is inspired by that of Microsoft.CodeAnalysis.IMethodSymbol from Roslyn, the .NET Compiler Platform.

Member Function Documentation

◆ asFunction() [1/2]

virtual const Function* psy::C::Function::asFunction ( ) const
inlineoverridevirtual

Cast this Symbol as a FunctionSymbol.

Reimplemented from psy::C::Declaration.

◆ asFunction() [2/2]

virtual Function* psy::C::Function::asFunction ( )
inlineoverridevirtual

Cast this Symbol as a FunctionSymbol.

Reimplemented from psy::C::Declaration.

◆ identifier()

virtual const Identifier* psy::C::Function::identifier ( ) const
inlineoverridevirtual

The Identifier with which this Declaration is declared.

Implements psy::C::Declaration.

◆ name()

const Identifier * Function::name ( ) const

The Identifier that names this FunctionSymbol.

◆ returnType()

const Type* psy::C::Function::returnType ( ) const

The Type of the return of this FunctionSymbol.

See also
FunctionSymbol::type

◆ toDisplayString()

std::string Function::toDisplayString ( ) const
overridevirtual

Compute a displayable string for this Symbol.

Implements psy::C::Symbol.

◆ type()

const Type * Function::type ( ) const

The Type of this FunctionSymbol.

See also
FunctionSymbol::returnType

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