Puma::CFunctionInfo Class Reference

#include <Puma/infos/CFunctionInfo.h>

Inheritance diagram for Puma::CFunctionInfo:

Inheritance graph

List of all members.


Detailed Description

A CFunctionInfo object represents a function declaration.

Public Member Functions

 CFunctionInfo ()
 ~CFunctionInfo ()
CFunctionInfoBaseObject () const
CFunctionInfoDefObject () const
CTypeFunctionTypeInfo () const
CTypeInfoConversionType () const
CTypeInfoReturnType () const
CTemplateInfoTemplateInfo () const
CRecordRecord () const
CNamespaceInfoNamespace () const
unsigned Labels () const
unsigned Arguments () const
CLabelInfoLabel (unsigned n) const
CLabelInfoLabel (const char *name) const
CArgumentInfoArgument (unsigned n) const
CArgumentInfoArgument (const char *name) const
CTreeDefaultArgument (unsigned n) const
CT_ExprListInit () const
void ConversionType (CTypeInfo *type)
void QualifiedScope (CStructure *scope)
void addArgument (CArgumentInfo *info)
void addLabel (CLabelInfo *label)
void removeArgument (const CArgumentInfo *)
void removeLabel (const CLabelInfo *label)
void TemplateInfo (CTemplateInfo *info)
void isTemplate (bool v)
CArgumentInfonewArgument ()
CLabelInfonewLabel ()
void deleteArgument (const CArgumentInfo *info)
void deleteLabel (const CLabelInfo *info)
bool hasEllipsis () const
bool hasDefaultArgument (unsigned n) const
bool isFctDef () const
bool isMethod () const
bool isStaticMethod () const
bool isTemplate () const
bool isDefined () const
bool isDestructor () const
bool isConstructor () const
bool isOperator () const
bool isConversion () const
void isDestructor (bool v)
void isConstructor (bool v)
void isOperator (bool v)
void isConversion (bool v)
bool isPureVirtual () const
bool hasSameNameAndArgs (const CFunctionInfo *fi) const
bool overridesVirtual () const

Protected Member Functions

 CFunctionInfo (ObjectId id)

Constructor & Destructor Documentation

Puma::CFunctionInfo::CFunctionInfo ( ObjectId  id  )  [inline, protected]

This constructor is to be used by classes inherited from CFunctionInfo. It makes it possible to set another object id than FUNCTION_INFO for abstractions not representing a standard function (e.g. CFctInstance).

Parameters:
id The object id to be used instead of FUNCTION_INFO.

Puma::CFunctionInfo::CFunctionInfo (  )  [inline]

Construct a new function info.

Puma::CFunctionInfo::~CFunctionInfo (  ) 

Destruct the function info.


Member Function Documentation

CFunctionInfo * Puma::CFunctionInfo::BaseObject (  )  const [inline]

Get the base info object of the info object. The corresponding information is not yet set!

Returns:
This method always returns NULL.
Warning:
Do not use this method.

Reimplemented from Puma::CObjectInfo.

CFunctionInfo* Puma::CFunctionInfo::DefObject (  )  const

Get the info object of the function definition.

Returns:
The info or this if the function is not defined.

Reimplemented from Puma::CObjectInfo.

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

Get the type information object for the function.

Reimplemented from Puma::CObjectInfo.

CTypeInfo * Puma::CFunctionInfo::ConversionType (  )  const [inline]

Return the conversion type if this is a conversion function.

Returns:
The conversion type or NULL if not a conversion function.

CTypeInfo* Puma::CFunctionInfo::ReturnType (  )  const

Return the return type of the function.

CTemplateInfo * Puma::CFunctionInfo::TemplateInfo (  )  const [inline]

Get the template info if this is a function template.

Returns:
The template info or NULL if not a function template.

Reimplemented from Puma::CObjectInfo.

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

Return the class or union if this is method of a class or union.

Returns:
The record info or NULL if not a method.

Reimplemented from Puma::CObjectInfo.

CNamespaceInfo* Puma::CFunctionInfo::Namespace (  )  const

Get the namespace info if this function is declared in a namespace.

Returns:
The namespace info or NULL if not declared in a namespace.

unsigned Puma::CFunctionInfo::Labels (  )  const [inline]

Get the number of jump labels defined in the function body.

unsigned Puma::CFunctionInfo::Arguments (  )  const [inline]

Get the number of function parameters.

CLabelInfo * Puma::CFunctionInfo::Label ( unsigned  n  )  const [inline]

Get the n-th jump label.

Parameters:
n The number of the jump label.
Returns:
The label info or NULL if n is invalid.

CLabelInfo* Puma::CFunctionInfo::Label ( const char *  name  )  const

Get the jump label with the given name.

Parameters:
name The name of the jump label.
Returns:
The label info or NULL if no such label.

CArgumentInfo * Puma::CFunctionInfo::Argument ( unsigned  n  )  const [inline]

Get the n-th function parameter.

Parameters:
n The number of the function parameter.
Returns:
The function parameter info or NULL if n is invalid.

CArgumentInfo* Puma::CFunctionInfo::Argument ( const char *  name  )  const

Get the function parameter with the given name.

Parameters:
name The name of the function parameter.
Returns:
The function parameter info or NULL if no such parameter.

CTree* Puma::CFunctionInfo::DefaultArgument ( unsigned  n  )  const

Get the default argument of the n-th function parameter.

Parameters:
The number of the function parameter.
Returns:
The syntax tree node of the default argument or NULL if the n-th parameter has no default argument.

CT_ExprList* Puma::CFunctionInfo::Init (  )  const

Get the initializer of the function. Only pure virtual functions have an initializer, i.e. "=0".

Returns:
The syntax tree node of the initializer or NULL if function is not pure virtual.

Reimplemented from Puma::CObjectInfo.

void Puma::CFunctionInfo::ConversionType ( CTypeInfo type  )  [inline]

Set the conversion type of a conversion function.

Parameters:
type The conversion type.

void Puma::CFunctionInfo::QualifiedScope ( CStructure scope  )  [inline]

Set the qualification scope of a class/union method or function declared in a namespace.

Parameters:
scope The qualification scope.

void Puma::CFunctionInfo::addArgument ( CArgumentInfo info  ) 

Add a function parameter to the function.

Parameters:
info The function parameter info.

void Puma::CFunctionInfo::addLabel ( CLabelInfo label  ) 

Add a jump label to the function.

Parameters:
label The label info.

void Puma::CFunctionInfo::removeArgument ( const CArgumentInfo  ) 

Remove the given function parameter from the function.

Parameters:
info The function parameter info.

void Puma::CFunctionInfo::removeLabel ( const CLabelInfo label  ) 

Remove the given jump label from the function.

Parameters:
label The label info.

void Puma::CFunctionInfo::TemplateInfo ( CTemplateInfo info  )  [inline]

Set the template info of a function template.

Parameters:
info The template info.

void Puma::CFunctionInfo::isTemplate ( bool  v  )  [inline]

Set whether the function is a function template.

Parameters:
v true if the function is a template.

CArgumentInfo* Puma::CFunctionInfo::newArgument (  ) 

Create a new function parameter. The function parameter info is added to the function.

CLabelInfo* Puma::CFunctionInfo::newLabel (  ) 

Create a new jump label. The jump label info is added to the function.

void Puma::CFunctionInfo::deleteArgument ( const CArgumentInfo info  ) 

Remove and destroy the given function parameter.

Parameters:
info The function parameter info.

void Puma::CFunctionInfo::deleteLabel ( const CLabelInfo info  ) 

Remove and destroy the given jump label.

Parameters:
info The jump label info.

bool Puma::CFunctionInfo::hasEllipsis (  )  const

Return true if the function accepts a variable argument list.

bool Puma::CFunctionInfo::hasDefaultArgument ( unsigned  n  )  const

Return true if the n-th function parameter has a default argument.

Parameters:
n The number of the function parameter.

bool Puma::CFunctionInfo::isFctDef (  )  const

Return true if this is the info of a function definition.

bool Puma::CFunctionInfo::isMethod (  )  const [inline]

Return true if this is a method of a class or union.

Reimplemented from Puma::CScopeInfo.

bool Puma::CFunctionInfo::isStaticMethod (  )  const [inline]

Return true if this is a static method of a class or union.

bool Puma::CFunctionInfo::isTemplate (  )  const [inline]

Return true if this is a function template.

Reimplemented from Puma::CObjectInfo.

bool Puma::CFunctionInfo::isDefined (  )  const

Return true if the function is defined.

bool Puma::CFunctionInfo::isDestructor (  )  const [inline]

Return true if this is a destructor.

bool Puma::CFunctionInfo::isConstructor (  )  const [inline]

Return true if this is a constructor.

bool Puma::CFunctionInfo::isOperator (  )  const [inline]

Return true if this is an overloaded operator.

bool Puma::CFunctionInfo::isConversion (  )  const [inline]

Return true if this is a conversion function.

void Puma::CFunctionInfo::isDestructor ( bool  v  )  [inline]

Set whether the function is a destructor.

Parameters:
v true if the function is a destructor.

void Puma::CFunctionInfo::isConstructor ( bool  v  )  [inline]

Set whether the function is a constructor.

Parameters:
v true if the function is a constructor.

void Puma::CFunctionInfo::isOperator ( bool  v  )  [inline]

Set whether the function is an overloaded operator.

Parameters:
v true if the function is an overloaded operator.

void Puma::CFunctionInfo::isConversion ( bool  v  )  [inline]

Set whether the function is a conversion function.

Parameters:
v true if the function is a conversion function.

bool Puma::CFunctionInfo::isPureVirtual (  )  const

Return true if the function is pure virtual.

bool Puma::CFunctionInfo::hasSameNameAndArgs ( const CFunctionInfo fi  )  const

Returns true if the argument function has the same name and parameter types

Parameters:
fi function info object of the compared function.

bool Puma::CFunctionInfo::overridesVirtual (  )  const

Returns true if the function is a non-static member function and if in any of the base classes there is a function definition of a virtual function with the same name and argument types


Generated on Sat May 10 03:03:50 2008 for Puma by  doxygen 1.5.5