clang API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
clang::TemplateDecl Class Reference

#include <DeclTemplate.h>

Inheritance diagram for clang::TemplateDecl:
Inheritance graph
[legend]
Collaboration diagram for clang::TemplateDecl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

TemplateParameterListgetTemplateParameters () const
 Get the list of template parameters.
NamedDeclgetTemplatedDecl () const
 Get the underlying, templated declaration.
SourceRange getSourceRange () const
 Source range that this declaration covers.
void init (NamedDecl *templatedDecl, TemplateParameterList *templateParams)
 Initialize the underlying templated declaration and template parameters.

Static Public Member Functions

static bool classof (const Decl *D)
static bool classof (const TemplateDecl *D)
static bool classof (const RedeclarableTemplateDecl *D)
static bool classof (const FunctionTemplateDecl *D)
static bool classof (const ClassTemplateDecl *D)
static bool classof (const TemplateTemplateParmDecl *D)
static bool classof (const TypeAliasTemplateDecl *D)
static bool classofKind (Kind K)

Protected Member Functions

 TemplateDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name)
 TemplateDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params)
 TemplateDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, NamedDecl *Decl)

Protected Attributes

NamedDeclTemplatedDecl
TemplateParameterListTemplateParams

Detailed Description

TemplateDecl - The base class of all kinds of template declarations (e.g., class, function, etc.). The TemplateDecl class stores the list of template parameters and a reference to the templated scoped declaration: the underlying AST node.

Definition at line 201 of file DeclTemplate.h.


Constructor & Destructor Documentation

clang::TemplateDecl::TemplateDecl ( Kind  DK,
DeclContext DC,
SourceLocation  L,
DeclarationName  Name 
) [inline, protected]

Definition at line 205 of file DeclTemplate.h.

clang::TemplateDecl::TemplateDecl ( Kind  DK,
DeclContext DC,
SourceLocation  L,
DeclarationName  Name,
TemplateParameterList Params 
) [inline, protected]

Definition at line 211 of file DeclTemplate.h.

clang::TemplateDecl::TemplateDecl ( Kind  DK,
DeclContext DC,
SourceLocation  L,
DeclarationName  Name,
TemplateParameterList Params,
NamedDecl Decl 
) [inline, protected]

Definition at line 216 of file DeclTemplate.h.


Member Function Documentation

static bool clang::TemplateDecl::classof ( const Decl D) [inline, static]
static bool clang::TemplateDecl::classof ( const TemplateDecl D) [inline, static]

Definition at line 232 of file DeclTemplate.h.

static bool clang::TemplateDecl::classof ( const RedeclarableTemplateDecl D) [inline, static]

Reimplemented in clang::RedeclarableTemplateDecl.

Definition at line 233 of file DeclTemplate.h.

static bool clang::TemplateDecl::classof ( const FunctionTemplateDecl D) [inline, static]

Reimplemented in clang::FunctionTemplateDecl, and clang::RedeclarableTemplateDecl.

Definition at line 234 of file DeclTemplate.h.

static bool clang::TemplateDecl::classof ( const ClassTemplateDecl D) [inline, static]

Reimplemented in clang::ClassTemplateDecl, and clang::RedeclarableTemplateDecl.

Definition at line 235 of file DeclTemplate.h.

static bool clang::TemplateDecl::classof ( const TemplateTemplateParmDecl D) [inline, static]

Reimplemented in clang::TemplateTemplateParmDecl.

Definition at line 236 of file DeclTemplate.h.

static bool clang::TemplateDecl::classof ( const TypeAliasTemplateDecl D) [inline, static]

Reimplemented in clang::TypeAliasTemplateDecl, and clang::RedeclarableTemplateDecl.

Definition at line 237 of file DeclTemplate.h.

static bool clang::TemplateDecl::classofKind ( Kind  K) [inline, static]
SourceRange clang::TemplateDecl::getSourceRange ( ) const [inline, virtual]
NamedDecl* clang::TemplateDecl::getTemplatedDecl ( ) const [inline]

Get the underlying, templated declaration.

Reimplemented in clang::TypeAliasTemplateDecl, clang::ClassTemplateDecl, and clang::FunctionTemplateDecl.

Definition at line 228 of file DeclTemplate.h.

References TemplatedDecl.

Referenced by clang::ASTDeclWriter::VisitTemplateDecl().

TemplateParameterList* clang::TemplateDecl::getTemplateParameters ( ) const [inline]
void clang::TemplateDecl::init ( NamedDecl templatedDecl,
TemplateParameterList templateParams 
) [inline]

Initialize the underlying templated declaration and template parameters.

Definition at line 254 of file DeclTemplate.h.

References TemplatedDecl, and TemplateParams.

Referenced by clang::ASTDeclReader::VisitTemplateDecl().


Member Data Documentation

Definition at line 249 of file DeclTemplate.h.

Referenced by getSourceRange(), getTemplateParameters(), and init().


The documentation for this class was generated from the following files: