ponder 3.2
C++ reflection library
ponder::Function Class Referenceabstract

Abstract representation of a function. More...

#include <function.hpp>

+ Inheritance diagram for ponder::Function:

Public Member Functions

virtual ~Function ()
 Destructor.
 
IdReturn name () const
 Get the name of the function. More...
 
FunctionKind kind () const
 Get the kind of function represented here. More...
 
ValueKind returnType () const
 Get the type of variable returned by the function. More...
 
policy::ReturnKind returnPolicy () const
 Get the kind of return policy this function uses. More...
 
virtual size_t paramCount () const =0
 Get the number of parameters of the function. More...
 
virtual ValueKind paramType (size_t index) const =0
 Get the type of an parameter given by its index. More...
 
virtual void accept (ClassVisitor &visitor) const
 Accept the visitation of a ClassVisitor. More...
 
const void * getUsesData () const
 Get the per-function uses data (internal) More...
 

Detailed Description

Abstract representation of a function.

Functions are members of metaclasses. Their purpose is to provide detailed information about their prototype.

Member Function Documentation

◆ accept()

virtual void ponder::Function::accept ( ClassVisitor visitor) const
virtual

Accept the visitation of a ClassVisitor.

Parameters
visitorVisitor to accept

◆ getUsesData()

const void* ponder::Function::getUsesData ( ) const
inline

Get the per-function uses data (internal)

Note
This data is private to the uses module that created it.
Returns
Opaque data pointer

◆ kind()

FunctionKind ponder::Function::kind ( ) const
inline

Get the kind of function represented here.

Returns
Kind of the function

◆ name()

IdReturn ponder::Function::name ( ) const

Get the name of the function.

Returns
Name of the function

◆ paramCount()

virtual size_t ponder::Function::paramCount ( ) const
pure virtual

Get the number of parameters of the function.

Returns
Total number of parameters taken by the function

◆ paramType()

virtual ValueKind ponder::Function::paramType ( size_t  index) const
pure virtual

Get the type of an parameter given by its index.

Parameters
indexIndex of the parameter
Returns
Type of the index-th parameter
Exceptions
OutOfRangeindex is out of range

◆ returnPolicy()

policy::ReturnKind ponder::Function::returnPolicy ( ) const
inline

Get the kind of return policy this function uses.

Returns
Kind of return policy enum

◆ returnType()

ValueKind ponder::Function::returnType ( ) const

Get the type of variable returned by the function.

Returns
Type of the result of the function

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