Welcome to the NetCologne GmbH open source mirroring service!

This machine mirrors various open-source projects. 20 Gbit/s uplink.

If there are any issues or you want another project mirrored, please contact mirror-service -=AT=- netcologne DOT de !

Comma: comma::DSTDefinition Class Reference

comma::DSTDefinition Class Reference

#include <DSTDefinition.h>

Inheritance diagram for comma::DSTDefinition:
Inheritance graph
[legend]
Collaboration diagram for comma::DSTDefinition:
Collaboration graph
[legend]

List of all members.

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 DiscreteTypegetType () const
 Returns the discrete type defined by this DSTDefinition.
DiscreteTypegetType ()
 Returns the discrete type defined by this DSTDefinition.
const RangegetRange () const
RangegetRange ()
 Returns the discrete type defined by this DSTDefinition.
const RangeAttribgetAttrib () const
RangeAttribgetAttrib ()
 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)

Detailed Description

Definition at line 36 of file DSTDefinition.h.


Member Enumeration Documentation

There are five syntatic methods by which a DSTDefinition can be described in source code. The following enumeration encodes the method used.

Enumerator:
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.


Constructor & Destructor Documentation

DSTDefinition::DSTDefinition ( Location  loc,
Ast base,
DSTTag  tag 
)

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.


Member Function Documentation

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.

Note:
When a discrete subtype is supplied to the constructor, this is the resulting state. A DSTDefinition is `promoted' to a constrained definition with a call to addConstraint().

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.


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

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1