Om  1.0.0
A universal framework for multimedia simulation
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
om::scripting::mir::lang::TemplateDeclaration Class Reference

A class that represents a template parameter list declaration. More...

#include <omScriptingMirTemplates.h>

Inheritance diagram for om::scripting::mir::lang::TemplateDeclaration:
om::scripting::mir::lang::ASTNode

Public Types

enum  ParameterKind { TYPE, VALUE, SPECIALIZATION, UNDEFINED }
 An enum describing the different kinds of parameters a template declaration can have. More...
 

Public Member Functions

 TemplateDeclaration ()
 Create a new template declaration object with no parameters present. More...
 
 ~TemplateDeclaration ()
 
Size getParameterCount () const
 Return the number of template parameters this template declaration specifies. More...
 
Bool addTypeParameter (const Shared< Identifier > &typeName)
 Add a new type parameter to the end of this template declaration's parameter list. More...
 
Bool addValueParameter (const Shared< lang::Type > &valueType, const Shared< Identifier > &valueName)
 Add a new value parameter to the end of this template declaration's parameter list. More...
 
Bool addSpecializedParameter (const Shared< lang::Type > &specializedType)
 Add a new specialized parameter to the end of this template declaration's parameter list. More...
 
ParameterKind getParameterKind (Index parameterIndex) const
 Return the kind of parameter at the specified index in this template declaration's parameter list. More...
 
Shared< lang::TypegetParameterType (Index parameterIndex) const
 Return the template type of the parameter at the specified index in this declaration's parameter list. More...
 
Shared< IdentifiergetParameterName (Index parameterIndex) const
 Return the name of the parameter at the specified index in this template declaration's parameter list. More...
 
- Public Member Functions inherited from om::scripting::mir::lang::ASTNode
 ASTNode ()
 Create a new AST node with no node position specified. More...
 
 ASTNode (const Position &newPosition)
 Create a new AST node which corresponds to a token starting at the specified source code position. More...
 
virtual ~ASTNode ()
 Destroy this AST node object. More...
 
const PositiongetPosition () const
 Return an object representing the position of this AST node in the source code. More...
 
void setPosition (const Position &newPosition)
 Set the position of this AST node in the source code. More...
 

Static Public Member Functions

static Shared< TemplateDeclarationconstruct ()
 Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments. More...
 

Detailed Description

A class that represents a template parameter list declaration.

Member Enumeration Documentation

An enum describing the different kinds of parameters a template declaration can have.

Enumerator
TYPE 

A value indicating the parameter is a type template.

VALUE 

A value indicating the parameter is a value template.

SPECIALIZATION 

A value indicating the parameter is a type specialization template.

UNDEFINED 

An undefined template declaration parameter type.

Constructor & Destructor Documentation

om::scripting::mir::lang::TemplateDeclaration::TemplateDeclaration ( )
inline

Create a new template declaration object with no parameters present.

om::scripting::mir::lang::TemplateDeclaration::~TemplateDeclaration ( )

Member Function Documentation

Size om::scripting::mir::lang::TemplateDeclaration::getParameterCount ( ) const
inline

Return the number of template parameters this template declaration specifies.

Bool om::scripting::mir::lang::TemplateDeclaration::addTypeParameter ( const Shared< Identifier > &  typeName)

Add a new type parameter to the end of this template declaration's parameter list.

Bool om::scripting::mir::lang::TemplateDeclaration::addValueParameter ( const Shared< lang::Type > &  valueType,
const Shared< Identifier > &  valueName 
)

Add a new value parameter to the end of this template declaration's parameter list.

Bool om::scripting::mir::lang::TemplateDeclaration::addSpecializedParameter ( const Shared< lang::Type > &  specializedType)

Add a new specialized parameter to the end of this template declaration's parameter list.

ParameterKind om::scripting::mir::lang::TemplateDeclaration::getParameterKind ( Index  parameterIndex) const
inline

Return the kind of parameter at the specified index in this template declaration's parameter list.

If the specified index is out-of-bounds, the UNDEFINED parameter kind is returned.

Shared<lang::Type> om::scripting::mir::lang::TemplateDeclaration::getParameterType ( Index  parameterIndex) const

Return the template type of the parameter at the specified index in this declaration's parameter list.

If the specified index is out-of-bounds or is a TYPE parameter kind, a NULL name Identifier pointer is returned.

Shared<Identifier> om::scripting::mir::lang::TemplateDeclaration::getParameterName ( Index  parameterIndex) const
inline

Return the name of the parameter at the specified index in this template declaration's parameter list.

If the specified index is out-of-bounds or is a SPECIALIZATION parameter, a NULL name Identifier pointer is returned.

static Shared<TemplateDeclaration> om::scripting::mir::lang::TemplateDeclaration::construct ( )
inlinestatic

Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments.


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