Puma Reference Manual Puma::CTemplateParamInfo Class Reference



Puma::CTemplateParamInfo Class Reference

Semantic information about a template parameter. More...

#include <Puma/CTemplateParamInfo.h>

Inheritance diagram for Puma::CTemplateParamInfo:
Inheritance graph

List of all members.

Public Member Functions

 CTemplateParamInfo ()
 Constructor.
 ~CTemplateParamInfo ()
 Destructor.
bool match (const CTemplateParamInfo &tp) const
 Check if this template parameter matches the given.
bool isTemplate () const
 Check if this is a template template parameter.
bool isTypeParam () const
 Check if this is a type template parameter.
CTemplateInfoTemplateInfo () const
 Get the template this parameter belongs to.
CTemplateInfoTemplateTemplate () const
 Get the template information of a template template parameter.
CT_TemplateParamDeclTree () const
 Get the syntax tree node representing the template parameter.
CTreeDefaultArgument () const
 Get the default argument of the template parameter.
CTypeTemplateParam * TypeInfo () const
 Get the template parameter type.
CTypeInfoValueType () const
 Get the value type of a type template parameter.
CTemplateInstanceTemplateInstance () const
 Get the template instance information for an instantiated template template parameter.
int getPosition () const
 Get the position/index of this parameter in the template parameter list.
void isTypeParam (bool v)
 Set whether this is a type template parameter.
void ValueType (CTypeInfo *type)
 Set the value type of a type template parameter.
void TemplateInfo (CTemplateInfo *info)
 Set the template parameter list information for a template template parameter.
void TemplateTemplate (CTemplateInfo *info)
 Set the template information for a template template parameter.
void TemplateInstance (CTemplateInstance *inst)
 Set the template instance information for an instantiated template template parameter.

Detailed Description

Semantic information about a template parameter.

There are three kinds of template parameter: type, non-type, and template template parameter.

 // T is a type template parameter
 // I is a non-type template parameter
 // TT is a template template parameter
 template<class T, int I, template<typename,int> class TT> 
 class X {
   TT<T,I> x;
 };

Constructor & Destructor Documentation

Destructor.

If the object type is CObjectInfo::TEMPLATE_PARAM_INFO, then CObjectInfo::CleanUp() is called and the template instance information object of a template template parameter is destroyed.


Member Function Documentation

Get the default argument of the template parameter.

Returns:
The default argument expression or NULL if no default argument.

Get the position/index of this parameter in the template parameter list.

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

Check if this is a template template parameter.

Reimplemented from Puma::CObjectInfo.

bool Puma::CTemplateParamInfo::isTypeParam ( ) const [inline]

Check if this is a type template parameter.

void Puma::CTemplateParamInfo::isTypeParam ( bool  v) [inline]

Set whether this is a type template parameter.

Parameters:
vTrue for yes, false for no.

Check if this template parameter matches the given.

Must be same kind of parameter, same type and value.

Get the template this parameter belongs to.

Reimplemented from Puma::CObjectInfo.

Set the template parameter list information for a template template parameter.

Parameters:
infoThe template parameter list information.

Get the template instance information for an instantiated template template parameter.

Reimplemented from Puma::CObjectInfo.

Set the template instance information for an instantiated template template parameter.

Parameters:
instThe template instance.

Get the template information of a template template parameter.

Set the template information for a template template parameter.

Parameters:
infoThe template information.

Get the syntax tree node representing the template parameter.

Reimplemented from Puma::CObjectInfo.

CTypeTemplateParam * Puma::CTemplateParamInfo::TypeInfo ( ) const [inline]

Get the template parameter type.

Reimplemented from Puma::CObjectInfo.

Get the value type of a type template parameter.

Set the value type of a type template parameter.

Parameters:
typeThe value type.