#include <DSTDefinition.h>


Public Types | |
| enum | DSTTag { Attribute_DST, Range_DST, Type_DST, Constrained_DST, Unconstrained_DST } |
Public Member Functions | |
| DSTDefinition (Location loc, Ast *base, DSTTag tag) | |
| DSTTag | getTag () const |
| Returns the associated DSTTag. | |
| Location | getLocation () const |
| Returns the location of this node. | |
| bool | definedUsingRange () const |
| Returns true if this DSTDefinition was specified using a range. | |
| bool | definedUsingAttrib () const |
| bool | definedUsingSubtype () const |
| bool | definedUsingConstraint () const |
| bool | definedUsingDiamond () const |
| const DiscreteType * | getType () const |
| Returns the discrete type defined by this DSTDefinition. | |
| DiscreteType * | getType () |
| Returns the discrete type defined by this DSTDefinition. | |
| const Range * | getRange () const |
| Range * | getRange () |
| Returns the discrete type defined by this DSTDefinition. | |
| const RangeAttrib * | getAttrib () const |
| RangeAttrib * | getAttrib () |
| Returns the discrete type defined by this DSTDefinition. | |
Static Public Member Functions | |
| static bool | classof (const DSTDefinition *node) |
| Support isa and dyn_cast. | |
| static bool | classof (const Ast *node) |
Definition at line 36 of file DSTDefinition.h.
There are five syntatic methods by which a DSTDefinition can be described in source code. The following enumeration encodes the method used.
| Attribute_DST |
Range attribute. |
| Range_DST |
Simple range. |
| Type_DST |
Discrete type w/o constraint. |
| Constrained_DST |
Explicitly constrained discrete type. |
| Unconstrained_DST |
Corresponds to "range <>". |
Definition at line 42 of file DSTDefinition.h.
Constructs a DSTDefinition over a generic AST node. The supplied node must be either a RangeAttrib or a DiscreteType. The former is only valid when tag is Attribute_DST.
Definition at line 19 of file DSTDefinition.cpp.
| static bool comma::DSTDefinition::classof | ( | const Ast * | node | ) | [inline, static] |
Definition at line 109 of file DSTDefinition.h.
| static bool comma::DSTDefinition::classof | ( | const DSTDefinition * | node | ) | [inline, static] |
Support isa and dyn_cast.
Reimplemented from comma::Ast.
Definition at line 108 of file DSTDefinition.h.
| bool comma::DSTDefinition::definedUsingAttrib | ( | ) | const [inline] |
Returns true if this DSTDefinition was specified using a range attribute.
Definition at line 81 of file DSTDefinition.h.
| bool comma::DSTDefinition::definedUsingConstraint | ( | ) | const [inline] |
Returns true if this DSTDefinition was specified using an explicity constrained subtype indication.
Definition at line 101 of file DSTDefinition.h.
| bool comma::DSTDefinition::definedUsingDiamond | ( | ) | const [inline] |
Returns true if this DSTDefinition was specified as an unconstrained index type.
Definition at line 105 of file DSTDefinition.h.
| bool comma::DSTDefinition::definedUsingRange | ( | ) | const [inline] |
Returns true if this DSTDefinition was specified using a range.
Definition at line 70 of file DSTDefinition.h.
| bool comma::DSTDefinition::definedUsingSubtype | ( | ) | const [inline] |
Returns true if this DSTDefinition was specified using a simple subtype mark.
Definition at line 97 of file DSTDefinition.h.
| RangeAttrib * DSTDefinition::getAttrib | ( | ) |
Returns the discrete type defined by this DSTDefinition.
Definition at line 80 of file DSTDefinition.cpp.
| const RangeAttrib * DSTDefinition::getAttrib | ( | ) | const |
When definedUsingAttib is true, returns the RangeAttrib associated with this DSTDefinition.
Definition at line 75 of file DSTDefinition.cpp.
| Location comma::DSTDefinition::getLocation | ( | ) | const [inline, virtual] |
Returns the location of this node.
Reimplemented from comma::Ast.
Definition at line 59 of file DSTDefinition.h.
| Range * DSTDefinition::getRange | ( | ) |
Returns the discrete type defined by this DSTDefinition.
Definition at line 68 of file DSTDefinition.cpp.
| const Range * DSTDefinition::getRange | ( | ) | const |
When definedUsingRange is true, returns the range associated with this DSTDefinition.
Definition at line 61 of file DSTDefinition.cpp.
| DSTTag comma::DSTDefinition::getTag | ( | ) | const [inline] |
Returns the associated DSTTag.
Definition at line 56 of file DSTDefinition.h.
| DiscreteType * DSTDefinition::getType | ( | ) |
Returns the discrete type defined by this DSTDefinition.
Definition at line 43 of file DSTDefinition.cpp.
| const DiscreteType* comma::DSTDefinition::getType | ( | ) | const [inline] |
Returns the discrete type defined by this DSTDefinition.
Definition at line 63 of file DSTDefinition.h.
1.6.1