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

A class that represents a fully qualified type within the source code. More...

#include <omScriptingMirType.h>

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

Public Types

enum  Kind {
  REFERENCE, AUTO, DYNAMIC, CHAR,
  BYTE, UBYTE, SHORT, USHORT,
  INT, UINT, LONG, ULONG,
  FLOAT, DOUBLE, BOOL, NULL_POINTER,
  VOID
}
 An enum that specifies the different kinds of types there can be. More...
 

Public Member Functions

 Type (Kind newKind)
 Create a new non-const, non-array, non-auto type object with no type reference. More...
 
 Type (const Shared< Reference > &newReference)
 Create a new non-const, non-array, non-auto type object that has the specified type reference. More...
 
 Type (const Type &newType)
 Create a copy of the specified type. More...
 
Kind getKind () const
 Return an enum value indicating what kind of type this is. More...
 
Bool isPrimitive () const
 Return whether or not this type indicates a primitive (value) type. More...
 
const Shared< Reference > & getReference () const
 Return an optionally NULL pointer to the reference object that defines this type's qualifiers. More...
 
void setReference (const Shared< Reference > &newReference)
 Set an optionally NULL pointer to the reference object that defines this type's qualifiers. More...
 
Size getArrayDimension () const
 Return the number of array dimensions there are for this type. More...
 
void setArrayDimension (Size newArrayDimension)
 Set the number of array dimensions there are for this type. More...
 
Bool isArray () const
 Return whether or not this is an array-based type (its array dimension is greater than 0). More...
 
Bool getIsConst () const
 Return whether or not this type is a constant type (objects of it can't be modified). More...
 
void setIsConst (Bool newIsConst)
 Set whether or not this type is a constant type (objects of it can't be modified). 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< lang::Typeconstruct (Kind newKind)
 Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments. More...
 
static Shared< lang::Typeconstruct (const Shared< Reference > &newReference)
 Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments. More...
 
static Shared< lang::Typeconstruct (const lang::Type &newType)
 Construct a smart-pointer-wrapped instance of this class using the constructor with the given arguments. More...
 

Detailed Description

A class that represents a fully qualified type within the source code.

Member Enumeration Documentation

An enum that specifies the different kinds of types there can be.

Enumerator
REFERENCE 

A reference-based type.

AUTO 

A statically-inferred automatic type.

DYNAMIC 

A dynamic run-time-determined type.

CHAR 

A character type.

BYTE 

An 8-bit signed integer type.

UBYTE 

An 8-bit unsigned integer type.

SHORT 

A 16-bit signed integer type.

USHORT 

A 16-bit unsigned integer type.

INT 

A 32-bit signed integer type.

UINT 

A 32-bit unsigned integer type.

LONG 

A 64-bit signed integer type.

ULONG 

A 64-bit unsigned integer type.

FLOAT 

A 32-bit floating-point type.

DOUBLE 

A 64-bit floating-point type.

BOOL 

A boolean type.

NULL_POINTER 

A null-pointer type, of which the only value is 'null'.

VOID 

A void type.

Constructor & Destructor Documentation

om::scripting::mir::lang::Type::Type ( Kind  newKind)
inline

Create a new non-const, non-array, non-auto type object with no type reference.

om::scripting::mir::lang::Type::Type ( const Shared< Reference > &  newReference)
inline

Create a new non-const, non-array, non-auto type object that has the specified type reference.

om::scripting::mir::lang::Type::Type ( const Type newType)
inline

Create a copy of the specified type.

Member Function Documentation

Kind om::scripting::mir::lang::Type::getKind ( ) const
inline

Return an enum value indicating what kind of type this is.

Bool om::scripting::mir::lang::Type::isPrimitive ( ) const
inline

Return whether or not this type indicates a primitive (value) type.

const Shared<Reference>& om::scripting::mir::lang::Type::getReference ( ) const
inline

Return an optionally NULL pointer to the reference object that defines this type's qualifiers.

void om::scripting::mir::lang::Type::setReference ( const Shared< Reference > &  newReference)
inline

Set an optionally NULL pointer to the reference object that defines this type's qualifiers.

Size om::scripting::mir::lang::Type::getArrayDimension ( ) const
inline

Return the number of array dimensions there are for this type.

A non-array type will have an array dimension of 0.

void om::scripting::mir::lang::Type::setArrayDimension ( Size  newArrayDimension)
inline

Set the number of array dimensions there are for this type.

A non-array type will have an array dimension of 0.

Bool om::scripting::mir::lang::Type::isArray ( ) const
inline

Return whether or not this is an array-based type (its array dimension is greater than 0).

Bool om::scripting::mir::lang::Type::getIsConst ( ) const
inline

Return whether or not this type is a constant type (objects of it can't be modified).

void om::scripting::mir::lang::Type::setIsConst ( Bool  newIsConst)
inline

Set whether or not this type is a constant type (objects of it can't be modified).

static Shared<lang::Type> om::scripting::mir::lang::Type::construct ( Kind  newKind)
inlinestatic

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

static Shared<lang::Type> om::scripting::mir::lang::Type::construct ( const Shared< Reference > &  newReference)
inlinestatic

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

static Shared<lang::Type> om::scripting::mir::lang::Type::construct ( const lang::Type newType)
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: