comma::PrimaryType Class Reference
#include <Type.h>
List of all members.
Detailed Description
The PrimaryType class forms the principle root of the type hierarchy. Most type nodes inherit from PrimaryType, with the notable exception of SubroutineType.
Definition at line 328 of file Type.h.
Constructor & Destructor Documentation
comma::PrimaryType::PrimaryType |
( |
AstKind |
kind, |
|
|
PrimaryType * |
rootOrParent, |
|
|
bool |
subtype | |
|
) |
| | [inline, protected] |
Protected constructor for primary types.
- Parameters:
-
| kind | The concrete kind tag for this node. |
| rootOrParent | If this is to represent a root type, then this argument is a pointer to the parent type or null. If this is to represent a subtype, then rootOrParent should point to the type of this subtype. |
| subtype | When true, the type under construction is a subtype. When false, the type is a root type. |
Definition at line 418 of file Type.h.
Member Function Documentation
static bool comma::PrimaryType::classof |
( |
const Ast * |
node |
) |
[inline, static] |
static bool comma::PrimaryType::classof |
( |
const PrimaryType * |
node |
) |
[inline, static] |
PrimaryType* comma::PrimaryType::getAncestorType |
( |
|
) |
[inline] |
Returns the root type of this type. If this is a root type, returns a pointer to this, otherwise the type of this subtype is returned.
Definition at line 376 of file Type.h.
const PrimaryType* comma::PrimaryType::getAncestorType |
( |
|
) |
const [inline] |
Returns the first ancestor type of this type, or null if this is a root type without a parent.
Definition at line 373 of file Type.h.
const PrimaryType* comma::PrimaryType::getParentType |
( |
|
) |
const [inline] |
Returns the root type of this type. If this is a root type, returns a pointer to this, otherwise the type of this subtype is returned.
Definition at line 364 of file Type.h.
PrimaryType* comma::PrimaryType::getParentType |
( |
|
) |
[inline] |
PrimaryType* comma::PrimaryType::getRootType |
( |
|
) |
[inline] |
const PrimaryType* comma::PrimaryType::getRootType |
( |
|
) |
const [inline] |
virtual bool comma::PrimaryType::isConstrained |
( |
|
) |
const [inline, virtual] |
bool comma::PrimaryType::isDerivedType |
( |
|
) |
const [inline] |
Returns true if this is a derived type.
Definition at line 352 of file Type.h.
bool comma::PrimaryType::isRootType |
( |
|
) |
const [inline] |
Returns true if this node denotes a root type.
Definition at line 335 of file Type.h.
bool comma::PrimaryType::isSubtype |
( |
|
) |
const [inline] |
Returns true if this node denotes a subtype.
Definition at line 332 of file Type.h.
bool comma::PrimaryType::isSubtypeOf |
( |
const PrimaryType * |
type |
) |
const [inline] |
Returns true if this type is a subtype of the given type.
All types are considered to be subtypes of themselves.
Definition at line 390 of file Type.h.
bool comma::PrimaryType::isUnconstrained |
( |
|
) |
const [inline] |
Returns true if this type is unconstrained.
Definition at line 385 of file Type.h.
The documentation for this class was generated from the following file: