Puma Reference Manual Puma: Puma::CTypeFunction Class Reference



Puma::CTypeFunction Class Reference

Type of a function. More...

#include <Puma/CTypeInfo.h>

Inherits Puma::CTypeQualified.

List of all members.

Public Member Functions

 CTypeFunction (CTypeInfo *base, CTypeList *args, bool prototype)
 Constructor.
 ~CTypeFunction ()
 Destructor.
CTypeListArgTypes () const
 Get the argument type list.
CTypeInfoReturnType () const
 Get the return type.
CFunctionInfoFunctionInfo () const
 Get the semantic information about the function.
CRecordRecord () const
 Get the semantic information about the class if the function is a class method.
void FunctionInfo (CFunctionInfo *)
 Set the semantic information about the function.
bool isStatic () const
 Check if the function is declared static.
bool hasPrototype () const
 Check if the function has a prototype.

Detailed Description

Type of a function.

Example:

 void foo(int);  // foo has type 'function returning void with one argument int'
                 // type structure:
                 // CTypeFunction args=int
                 //   CTypePrimitive void

Constructor & Destructor Documentation

Puma::CTypeFunction::CTypeFunction ( CTypeInfo base,
CTypeList args,
bool  prototype 
) [inline]

Constructor.

Type has id CTypeInfo::TYPE_FUNCTION.

Parameters:
base The base type (return type).
args The argument type list.
prototype Function has prototype.
Puma::CTypeFunction::~CTypeFunction (  )  [inline]

Destructor.


Member Function Documentation

CTypeList * Puma::CTypeFunction::ArgTypes (  )  const [inline]

Get the argument type list.

Reimplemented from Puma::CTypeInfo.

void Puma::CTypeFunction::FunctionInfo ( CFunctionInfo info  )  [inline]

Set the semantic information about the function.

CFunctionInfo * Puma::CTypeFunction::FunctionInfo (  )  const [inline]

Get the semantic information about the function.

Reimplemented from Puma::CTypeInfo.

bool Puma::CTypeFunction::hasPrototype (  )  const [inline]

Check if the function has a prototype.

bool Puma::CTypeFunction::isStatic (  )  const

Check if the function is declared static.

CRecord* Puma::CTypeFunction::Record (  )  const

Get the semantic information about the class if the function is a class method.

Reimplemented from Puma::CTypeInfo.

CTypeInfo * Puma::CTypeFunction::ReturnType (  )  const [inline]

Get the return type.




Puma Reference Manual. Created on 24 Nov 2009.