| Puma Reference Manual | Puma: Puma::CTemplateInfo Class Reference |
#include <Puma/CTemplateInfo.h>

Contains information about the parameters, specializations, and instances of the template.
Public Member Functions | |
| CTemplateInfo () | |
| Constructor. | |
| ~CTemplateInfo () | |
| Destructor. | |
| void | removeLinks () |
| Remove all links from other semantic objects to this semantic object. | |
| bool | isFunction () const |
| Check if this is a function template definition. | |
| bool | isClass () const |
| Check if this is a class template definition. | |
| bool | isAttribute () const |
| Check if this is the definition of a static template class date member. | |
| bool | isBaseTemplate () const |
| Check if this is a base template and not a specialization of another template. | |
| bool | isSpecialization () const |
| Check if this is a specialization of another template. | |
| void | increaseDepth () |
| Increase the instantiation depth (for nested template instantiations). | |
| void | decreaseDepth () |
| Decrease the instantiation depth (for nested template instantiations). | |
| unsigned | Depth () const |
| Get the current instantiation depth (for nested template instantiations). | |
| CObjectInfo * | ObjectInfo () const |
| Get the semantic information for the entity. | |
| CT_TemplateDecl * | Tree () const |
| Get the syntax tree node for the template declaration. | |
| CTemplateInfo * | BaseTemplate () const |
| Get the base template if this is template specialization. | |
| CTemplateParamInfo * | newTemplateParam (bool add=true) |
| Create a new template parameter. | |
| unsigned | Parameters () const |
| Get the number of template parameters. | |
| CTemplateParamInfo * | Parameter (unsigned n) const |
| Get the n-th template parameter. | |
| CT_ExprList * | DefaultArgument (unsigned n) const |
| Get the default argument of the n-th template parameter. | |
| unsigned | Instances () const |
| Get the number of instances of this template. | |
| CObjectInfo * | Instance (unsigned n) |
| Get the n-th instance of this template. | |
| void | addInstance (CObjectInfo *info) |
| Add the given instance to the template. | |
| void | addPseudoInstance (CObjectInfo *info) |
| Add the given pseudo instance to the template. | |
| void | removeInstance (const CObjectInfo *info) |
| Remove the given template instance. | |
| unsigned | Specializations () const |
| Get the number of specializations of this template. | |
| CTemplateInfo * | Specialization (unsigned n) |
| Get the n-th specialization of this template. | |
| void | addSpecialization (CTemplateInfo *info) |
| Add the given specialization of the template. | |
| void | removeSpecialization (const CTemplateInfo *info) |
| Remove the given specialization of the template. | |
| void | isSpecialization (bool v) |
| Set whether this is a specialization of a template. | |
| void | SpecializationName (CT_TemplateName *name) |
| Set the template specialization name (template id). | |
| CT_TemplateName * | SpecializationName () const |
| Get the template specialization name. | |
| void | deleteTemplateParam (const CTemplateParamInfo *p) |
| Remove and destroy the given template parameter. | |
| void | ObjectInfo (CObjectInfo *info) |
| Set the semantic object of the entity (class, function, etc). | |
| void | BaseTemplate (CTemplateInfo *info) |
| Set the base template if this is a template specialization. | |
Static Public Member Functions | |
| static bool | equalArguments (CTemplateInstance *i1, CTemplateInstance *i2) |
| Check if the given template instances have the same instantiation arguments. | |
| Puma::CTemplateInfo::CTemplateInfo | ( | ) | [inline] |
Constructor.
| Puma::CTemplateInfo::~CTemplateInfo | ( | ) |
Destructor.
Unlinks itself from the specializations and instances of this template. If the object type is CObjectInfo::TEMPLATE_INFO, CObjectInfo::CleanUp() is called.
| void Puma::CTemplateInfo::removeLinks | ( | ) |
Remove all links from other semantic objects to this semantic object.
| bool Puma::CTemplateInfo::isFunction | ( | ) | const [inline] |
| bool Puma::CTemplateInfo::isClass | ( | ) | const [inline] |
| bool Puma::CTemplateInfo::isAttribute | ( | ) | const [inline] |
Check if this is the definition of a static template class date member.
| bool Puma::CTemplateInfo::isBaseTemplate | ( | ) | const [inline] |
Check if this is a base template and not a specialization of another template.
| bool Puma::CTemplateInfo::isSpecialization | ( | ) | const [inline] |
Check if this is a specialization of another template.
| void Puma::CTemplateInfo::increaseDepth | ( | ) | [inline] |
Increase the instantiation depth (for nested template instantiations).
| void Puma::CTemplateInfo::decreaseDepth | ( | ) | [inline] |
Decrease the instantiation depth (for nested template instantiations).
| unsigned Puma::CTemplateInfo::Depth | ( | ) | const [inline] |
Get the current instantiation depth (for nested template instantiations).
| CObjectInfo * Puma::CTemplateInfo::ObjectInfo | ( | ) | const [inline] |
| CT_TemplateDecl * Puma::CTemplateInfo::Tree | ( | ) | const [inline] |
| CTemplateInfo * Puma::CTemplateInfo::BaseTemplate | ( | ) | const [inline] |
Get the base template if this is template specialization.
| CTemplateParamInfo* Puma::CTemplateInfo::newTemplateParam | ( | bool | add = true |
) |
Create a new template parameter.
| add | If true, add the created parameter to the template. |
| unsigned Puma::CTemplateInfo::Parameters | ( | ) | const [inline] |
Get the number of template parameters.
| CTemplateParamInfo * Puma::CTemplateInfo::Parameter | ( | unsigned | n | ) | const [inline] |
Get the n-th template parameter.
| n | The index of the template parameter. |
| CT_ExprList* Puma::CTemplateInfo::DefaultArgument | ( | unsigned | n | ) | const |
Get the default argument of the n-th template parameter.
| n | The index of the template parameter. |
| unsigned Puma::CTemplateInfo::Instances | ( | ) | const [inline] |
Get the number of instances of this template.
| CObjectInfo * Puma::CTemplateInfo::Instance | ( | unsigned | n | ) | [inline] |
Get the n-th instance of this template.
| n | The index of the instance. |
| void Puma::CTemplateInfo::addInstance | ( | CObjectInfo * | info | ) | [inline] |
Add the given instance to the template.
| info | The semantic object of the template instance. |
| void Puma::CTemplateInfo::addPseudoInstance | ( | CObjectInfo * | info | ) | [inline] |
Add the given pseudo instance to the template.
| info | The pseudo template instance. |
| void Puma::CTemplateInfo::removeInstance | ( | const CObjectInfo * | info | ) |
Remove the given template instance.
| info | The template instance. |
| unsigned Puma::CTemplateInfo::Specializations | ( | ) | const [inline] |
Get the number of specializations of this template.
| CTemplateInfo * Puma::CTemplateInfo::Specialization | ( | unsigned | n | ) | [inline] |
Get the n-th specialization of this template.
| n | The index of the specialization. |
| void Puma::CTemplateInfo::addSpecialization | ( | CTemplateInfo * | info | ) |
Add the given specialization of the template.
| info | The semantic object of the specialization. |
| void Puma::CTemplateInfo::removeSpecialization | ( | const CTemplateInfo * | info | ) |
Remove the given specialization of the template.
| info | The template specialization. |
| void Puma::CTemplateInfo::isSpecialization | ( | bool | v | ) | [inline] |
Set whether this is a specialization of a template.
| v | true if this is a specialization. |
| void Puma::CTemplateInfo::SpecializationName | ( | CT_TemplateName * | name | ) | [inline] |
Set the template specialization name (template id).
| name | The template specialization name. |
| CT_TemplateName * Puma::CTemplateInfo::SpecializationName | ( | ) | const [inline] |
Get the template specialization name.
| void Puma::CTemplateInfo::deleteTemplateParam | ( | const CTemplateParamInfo * | p | ) |
Remove and destroy the given template parameter.
| p | The template parameter. |
| void Puma::CTemplateInfo::ObjectInfo | ( | CObjectInfo * | info | ) | [inline] |
Set the semantic object of the entity (class, function, etc).
| info | The semantic object. |
| void Puma::CTemplateInfo::BaseTemplate | ( | CTemplateInfo * | info | ) |
Set the base template if this is a template specialization.
| info | The base template. |
| static bool Puma::CTemplateInfo::equalArguments | ( | CTemplateInstance * | i1, | |
| CTemplateInstance * | i2 | |||
| ) | [static] |
Check if the given template instances have the same instantiation arguments.
| i1 | A template instance. | |
| i2 | Another template instance. |