Puma Reference Manual Puma: Puma::CTemplateParamInfo Class Reference



Puma::CTemplateParamInfo Class Reference

Semantic information about a template parameter. More...

#include <Puma/CTemplateParamInfo.h>

Inherits Puma::CObjectInfo.

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.
CT_ExprListDefaultArgument () const
 Get the default argument of the template parameter.
CTypeTemplateParamTypeInfo () 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

Puma::CTemplateParamInfo::CTemplateParamInfo (  )  [inline]

Constructor.

Puma::CTemplateParamInfo::~CTemplateParamInfo (  ) 

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

CT_ExprList* Puma::CTemplateParamInfo::DefaultArgument (  )  const

Get the default argument of the template parameter.

Returns:
The default argument expression or NULL if no default argument.
int Puma::CTemplateParamInfo::getPosition (  )  const

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.

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

Set whether this is a type template parameter.

Parameters:
v True for yes, false for no.
bool Puma::CTemplateParamInfo::isTypeParam (  )  const [inline]

Check if this is a type template parameter.

bool Puma::CTemplateParamInfo::match ( const CTemplateParamInfo tp  )  const

Check if this template parameter matches the given.

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

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

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

Parameters:
info The template parameter list information.
CTemplateInfo * Puma::CTemplateParamInfo::TemplateInfo (  )  const [inline]

Get the template this parameter belongs to.

Reimplemented from Puma::CObjectInfo.

void Puma::CTemplateParamInfo::TemplateInstance ( CTemplateInstance inst  )  [inline]

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

Parameters:
inst The template instance.
CTemplateInstance * Puma::CTemplateParamInfo::TemplateInstance (  )  const [inline]

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

Reimplemented from Puma::CObjectInfo.

void Puma::CTemplateParamInfo::TemplateTemplate ( CTemplateInfo info  )  [inline]

Set the template information for a template template parameter.

Parameters:
info The template information.
CTemplateInfo * Puma::CTemplateParamInfo::TemplateTemplate (  )  const [inline]

Get the template information of a template template parameter.

CT_TemplateParamDecl * Puma::CTemplateParamInfo::Tree (  )  const [inline]

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.

void Puma::CTemplateParamInfo::ValueType ( CTypeInfo type  )  [inline]

Set the value type of a type template parameter.

Parameters:
type The value type.
CTypeInfo * Puma::CTemplateParamInfo::ValueType (  )  const [inline]

Get the value type of a type template parameter.




Puma Reference Manual. Created on 11 Sep 2009.