comma::ComponentKey Class Reference

#include <AggExpr.h>

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

List of all members.

Public Member Functions

Location getLocation () const
 Returns the location of this ComponentKey.
void setLocation (Location loc)
 Sets the location of this ComponentKey.
bool isStatic () const
 Returns true if this ComponentKey is static.
Constructors.



 ComponentKey (Expr *node)
 ComponentKey (Identifier *node)
 ComponentKey (Range *node)
 ComponentKey (TypeRef *node)
 ComponentKey (ComponentDecl *node, Location loc)
Representation Predicates.



bool denotesExpr () const
 Returns true if this node denotes a expression.
bool denotesIdentifier () const
bool denotesRange () const
bool denotesType () const
 Returns true if this node denotes a Type.
bool denotesComponent () const
Representation Getters.



ExprgetAsExpr ()
IdentifiergetAsIdentifier ()
RangegetAsRange ()
TypeRefgetAsTypeRef ()
DiscreteTypegetAsDiscreteType ()
ComponentDeclgetAsComponent ()
const ExprgetAsExpr () const
const IdentifiergetAsIdentifier () const
const RangegetAsRange () const
const TypeRefgetAsTypeRef () const
const DiscreteTypegetAsDiscreteType () const
const ComponentDeclgetAsComponent () const
Ast *& getRep ()
 Returns the underlying node as a raw Ast.
const AstgetRep () const
Representation Setters.



void setKey (Expr *node)
void setKey (Range *node)
void setKey (TypeRef *node)
void setKey (Identifier *node)
void setKey (ComponentDecl *node)
Bounds Extractors.

Returns the lower and upper bounds associated with this ComponentKey.

Note:
These methods are only valid when this key is not represented by an identifier and isStatic() is true.


ExprgetLowerExpr ()
ExprgetUpperExpr ()
void getLowerValue (llvm::APInt &value) const
void getUpperValue (llvm::APInt &value) const

Static Public Member Functions

static bool classof (const ComponentKey *node)
 Support isa and dyn_cast.
static bool classof (const Ast *node)

Comparison Predicates.



bool isComparable () const
 Returns true if this ComponentKey is comparable.
static bool compareKeysU (const ComponentKey *X, const ComponentKey *Y)
 Provides an ordering relation between two ComponentKey's for which isComparable is true.
static bool compareKeysS (const ComponentKey *X, const ComponentKey *Y)
 Provides an ordering relation between two ComponentKey's for which isComparable is true.

Detailed Description

Definition at line 94 of file AggExpr.h.


Constructor & Destructor Documentation

comma::ComponentKey::ComponentKey ( Expr node  )  [inline]

Definition at line 99 of file AggExpr.h.

comma::ComponentKey::ComponentKey ( Identifier node  )  [inline]

Definition at line 101 of file AggExpr.h.

comma::ComponentKey::ComponentKey ( Range node  )  [inline]

Definition at line 103 of file AggExpr.h.

comma::ComponentKey::ComponentKey ( TypeRef node  )  [inline]

Definition at line 105 of file AggExpr.h.

comma::ComponentKey::ComponentKey ( ComponentDecl node,
Location  loc 
) [inline]

Definition at line 107 of file AggExpr.h.


Member Function Documentation

static bool comma::ComponentKey::classof ( const Ast node  )  [inline, static]

Definition at line 236 of file AggExpr.h.

static bool comma::ComponentKey::classof ( const ComponentKey node  )  [inline, static]

Support isa and dyn_cast.

Reimplemented from comma::Ast.

Definition at line 235 of file AggExpr.h.

bool ComponentKey::compareKeysS ( const ComponentKey X,
const ComponentKey Y 
) [static]

Provides an ordering relation between two ComponentKey's for which isComparable is true.

Predicate defining a less-than relation between keys of signed type. For use with std::stort.

Definition at line 81 of file AggExpr.cpp.

bool ComponentKey::compareKeysU ( const ComponentKey X,
const ComponentKey Y 
) [static]

Provides an ordering relation between two ComponentKey's for which isComparable is true.

Predicate defining a less-than relation between component keys of unsigned type. For use with std::stort.

Definition at line 70 of file AggExpr.cpp.

bool comma::ComponentKey::denotesComponent (  )  const [inline]

Definition at line 117 of file AggExpr.h.

bool comma::ComponentKey::denotesExpr (  )  const [inline]

Returns true if this node denotes a expression.

Reimplemented from comma::Ast.

Definition at line 113 of file AggExpr.h.

bool comma::ComponentKey::denotesIdentifier (  )  const [inline]

Definition at line 114 of file AggExpr.h.

bool comma::ComponentKey::denotesRange (  )  const [inline]

Definition at line 115 of file AggExpr.h.

bool comma::ComponentKey::denotesType (  )  const [inline]

Returns true if this node denotes a Type.

Reimplemented from comma::Ast.

Definition at line 116 of file AggExpr.h.

const ComponentDecl* comma::ComponentKey::getAsComponent (  )  const [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 170 of file AggExpr.h.

ComponentDecl* comma::ComponentKey::getAsComponent (  )  [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 148 of file AggExpr.h.

const DiscreteType* comma::ComponentKey::getAsDiscreteType (  )  const [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 164 of file AggExpr.h.

DiscreteType* comma::ComponentKey::getAsDiscreteType (  )  [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 142 of file AggExpr.h.

const Expr* comma::ComponentKey::getAsExpr (  )  const [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 152 of file AggExpr.h.

Expr* comma::ComponentKey::getAsExpr (  )  [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 130 of file AggExpr.h.

const Identifier* comma::ComponentKey::getAsIdentifier (  )  const [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 155 of file AggExpr.h.

Identifier* comma::ComponentKey::getAsIdentifier (  )  [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 133 of file AggExpr.h.

const Range* comma::ComponentKey::getAsRange (  )  const [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 158 of file AggExpr.h.

Range* comma::ComponentKey::getAsRange (  )  [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 136 of file AggExpr.h.

const TypeRef* comma::ComponentKey::getAsTypeRef (  )  const [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 161 of file AggExpr.h.

TypeRef* comma::ComponentKey::getAsTypeRef (  )  [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 139 of file AggExpr.h.

Location comma::ComponentKey::getLocation (  )  const [inline, virtual]

Returns the location of this ComponentKey.

Reimplemented from comma::Ast.

Definition at line 121 of file AggExpr.h.

Expr * ComponentKey::getLowerExpr (  ) 

Definition at line 38 of file AggExpr.cpp.

void ComponentKey::getLowerValue ( llvm::APInt &  value  )  const

Definition at line 54 of file AggExpr.cpp.

const Ast* comma::ComponentKey::getRep (  )  const [inline]

Returns the underlying node if it is of the corresponding type else null.

Definition at line 176 of file AggExpr.h.

Ast*& comma::ComponentKey::getRep (  )  [inline]

Returns the underlying node as a raw Ast.

Definition at line 175 of file AggExpr.h.

Expr * ComponentKey::getUpperExpr (  ) 

Definition at line 46 of file AggExpr.cpp.

void ComponentKey::getUpperValue ( llvm::APInt &  value  )  const

Definition at line 62 of file AggExpr.cpp.

bool comma::ComponentKey::isComparable (  )  const [inline]

Returns true if this ComponentKey is comparable.

ComponentKeys are comparable if the underlying representation is a static expression, range, discrete subtype indication. ComponentKeys represented as Identifiers are not considered to be comparable.

Definition at line 217 of file AggExpr.h.

bool ComponentKey::isStatic (  )  const

Returns true if this ComponentKey is static.

A ComponentKey is considered to be static when it is represented by a static expression, range, or discrete type. Identifiers are always considered to be static.

Definition at line 19 of file AggExpr.cpp.

void comma::ComponentKey::setKey ( ComponentDecl node  )  [inline]

Definition at line 185 of file AggExpr.h.

void comma::ComponentKey::setKey ( Identifier node  )  [inline]

Definition at line 184 of file AggExpr.h.

void comma::ComponentKey::setKey ( TypeRef node  )  [inline]

Definition at line 183 of file AggExpr.h.

void comma::ComponentKey::setKey ( Range node  )  [inline]

Definition at line 182 of file AggExpr.h.

void comma::ComponentKey::setKey ( Expr node  )  [inline]

Definition at line 181 of file AggExpr.h.

void comma::ComponentKey::setLocation ( Location  loc  )  [inline]

Sets the location of this ComponentKey.

Definition at line 124 of file AggExpr.h.


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

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1