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::TemplateInstantiation Class Reference

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

#include <omScriptingMirTemplates.h>

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

Public Types

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

Public Member Functions

 TemplateInstantiation ()
 Create a new template instantation object with no arguments present. More...
 
 ~TemplateInstantiation ()
 
Size getArgumentCount () const
 Return the number of template arguments this template instantiation specifies. More...
 
Bool addTypeArgument (const Shared< lang::Type > &newType)
 Add a new type argument to the end of this template instantiation's argument list. More...
 
Bool addValueArgument (const Shared< Expression > &newValue)
 Add a new value parameter to the end of this template declaration's parameter list. More...
 
ArgumentKind getArgumentKind (Index argumentIndex) const
 Return the kind of argument at the specified index in this template declaration's parameter list. More...
 
Shared< lang::TypegetArgumentType (Index parameterIndex) const
 Return the template type of the argument at the specified index in this declaration's argument list. More...
 
Shared< ExpressiongetArgumentValue (Index parameterIndex) const
 Return the expression of the argument at the specified index in this instantiaion's argument 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< TemplateInstantiationconstruct ()
 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 instantiation.

A template instantiation consists of a list of type or constant expression arguments that specify the instantiation for a previously declared template type or method.

Member Enumeration Documentation

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

Enumerator
TYPE 

A value indicating the parameter argument is a type template.

VALUE 

A value indicating the parameter argument is a value template.

UNDEFINED 

An undefined template instantiation argument type.

Constructor & Destructor Documentation

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

Create a new template instantation object with no arguments present.

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

Member Function Documentation

Size om::scripting::mir::lang::TemplateInstantiation::getArgumentCount ( ) const
inline

Return the number of template arguments this template instantiation specifies.

Bool om::scripting::mir::lang::TemplateInstantiation::addTypeArgument ( const Shared< lang::Type > &  newType)

Add a new type argument to the end of this template instantiation's argument list.

Bool om::scripting::mir::lang::TemplateInstantiation::addValueArgument ( const Shared< Expression > &  newValue)

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

ArgumentKind om::scripting::mir::lang::TemplateInstantiation::getArgumentKind ( Index  argumentIndex) const
inline

Return the kind of argument 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::TemplateInstantiation::getArgumentType ( Index  parameterIndex) const

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

If the specified index is out-of-bounds or is a VALUE argument kind, a NULL Type pointer is returned.

Shared<Expression> om::scripting::mir::lang::TemplateInstantiation::getArgumentValue ( Index  parameterIndex) const

Return the expression of the argument at the specified index in this instantiaion's argument list.

If the specified index is out-of-bounds or is a TYPE argument kind, a NULL Expression value pointer is returned.

static Shared<TemplateInstantiation> om::scripting::mir::lang::TemplateInstantiation::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: