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 Identifieridentifier () const override
 
const Identifiername () const
 
const Typetype () const
 
const TypereturnType () const
 
virtual std::string toDisplayString () const override
 
virtual FunctionasFunction () override
 
virtual const FunctionasFunction () const override
 
- Public Member Functions inherited from psy::C::Declaration
DeclarationKind kind () const
 
const ScopeenclosingScope () const
 
const NameSpace nameSpace () const
 
std::vector< SyntaxReferencedeclaringSyntaxReferences () const
 
Location location () const
 
virtual DeclarationasDeclaration () override
 
virtual const DeclarationasDeclaration () const override
 
virtual ObjectDeclarationasObjectDeclaration ()
 
virtual const ObjectDeclarationasObjectDeclaration () const
 
virtual TypeDeclarationasTypeDeclaration ()
 
virtual const TypeDeclarationasTypeDeclaration () const
 
- Public Member Functions inherited from psy::C::Symbol
SymbolKind kind () const
 
virtual ProgramasProgram ()
 
virtual const ProgramasProgram () const
 
virtual TranslationUnitasTranslationUnit ()
 
virtual const TranslationUnitasTranslationUnit () const
 
const SymbolcontainingSymbol () const
 

Protected Member Functions

FunctionSymbolImplCAST () const
 
- Protected Member Functions inherited from psy::C::Declaration
 Declaration (SymbolImpl *p, DeclarationKind declK)
 
 Declaration (const Declaration &)=delete
 
Declarationoperator= (const Declaration &)=delete
 
- Protected Member Functions inherited from psy::C::Symbol
 Symbol (SymbolImpl *p)
 
 Symbol (const Symbol &)=delete
 
Symboloperator= (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: