Puma Reference Manual Puma: Puma::CTypeFunction Class Reference



Puma::CTypeFunction Class Reference

#include <Puma/CTypeInfo.h>

Inheritance diagram for Puma::CTypeFunction:

Inheritance graph

List of all members.


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

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.

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.

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

Get the return type.

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

Get the semantic information about the function.

Reimplemented from Puma::CTypeInfo.

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

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

Reimplemented from Puma::CTypeInfo.

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

Set the semantic information about the function.

bool Puma::CTypeFunction::isStatic (  )  const

Check if the function is declared static.

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

Check if the function has a prototype.




Puma Reference Manual. Created on 11 Jul 2008.