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::TypeRef Class Reference

comma::TypeRef Class Reference

#include <TypeRef.h>

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

List of all members.

Public Member Functions

 TypeRef (Location loc, FunctorDecl *functor)
 Creates an incomplete reference to the given functor.
 TypeRef (Location loc, VarietyDecl *variety)
 Creates a incomplete reference to the given variety.
 TypeRef (Location loc, SigInstanceDecl *instance)
 Creates a complete reference to the given signature instance.
 TypeRef (Location loc, TypeDecl *tyDecl)
 Creates a complete reference to the given type declaration.
Location getLocation () const
 Returns the location of this reference.
IdentifierInfogetIdInfo () const
 Returns the IdentifierInfo of the underlying decl.
bool isIncomplete () const
 Returns true if this is a incomplete reference.
bool isComplete () const
 Returns true if this is a complete reference.
bool referencesVariety () const
 Returns true if this is an incomplete variety reference.
bool referencesFunctor () const
 Returns true if this is an incomplete functor reference.
bool referencesSigInstance () const
 Returns true if this is a complete reference to a signature instance.
bool referencesTypeDecl () const
 Returns true if this is a complete reference to a TypeDecl.
DeclgetDecl () const
 Returns the referenced declaration.
ModelDeclgetModelDecl () const
VarietyDeclgetVarietyDecl () const
 If this references a variety, return it, else null.
FunctorDeclgetFunctorDecl () const
 If this references a functor, return it, else null.
SigInstanceDeclgetSigInstanceDecl () const
 If this references a signature instance, return it, else null.
TypeDeclgetTypeDecl () const
 If this references a type declaration, return it, else null.

Static Public Member Functions

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

Detailed Description

The TypeRef class is a miscellaneous AST node, meaning that it does not belong to any of the major AST hierarchy branches. It is a thin wrapper around a specific named type, associating a location with the reference.

A TypeRef is said to be `incomplete' if the ref names a parameterized type such as a Variety or Functor. A `complete' ref is one which names a non-parameterized type, or a fully applied instance of a parameterized type.

These nodes are transient and do not find a home in the final AST. They are created to hold information about references to type declarations while the type checker is being driven by the parser.

Definition at line 33 of file TypeRef.h.


Constructor & Destructor Documentation

comma::TypeRef::TypeRef ( Location  loc,
FunctorDecl functor 
) [inline]

Creates an incomplete reference to the given functor.

Definition at line 37 of file TypeRef.h.

comma::TypeRef::TypeRef ( Location  loc,
VarietyDecl variety 
) [inline]

Creates a incomplete reference to the given variety.

Definition at line 41 of file TypeRef.h.

comma::TypeRef::TypeRef ( Location  loc,
SigInstanceDecl instance 
) [inline]

Creates a complete reference to the given signature instance.

Definition at line 45 of file TypeRef.h.

comma::TypeRef::TypeRef ( Location  loc,
TypeDecl tyDecl 
) [inline]

Creates a complete reference to the given type declaration.

Definition at line 49 of file TypeRef.h.


Member Function Documentation

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

Definition at line 117 of file TypeRef.h.

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

Support isa and dyn_cast.

Reimplemented from comma::Ast.

Definition at line 116 of file TypeRef.h.

Decl* comma::TypeRef::getDecl (  )  const [inline]

Returns the referenced declaration.

Definition at line 87 of file TypeRef.h.

FunctorDecl* comma::TypeRef::getFunctorDecl (  )  const [inline]

If this references a functor, return it, else null.

Definition at line 101 of file TypeRef.h.

IdentifierInfo* comma::TypeRef::getIdInfo (  )  const [inline]

Returns the IdentifierInfo of the underlying decl.

Definition at line 56 of file TypeRef.h.

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

Returns the location of this reference.

Reimplemented from comma::Ast.

Definition at line 53 of file TypeRef.h.

ModelDecl* comma::TypeRef::getModelDecl (  )  const [inline]

If this references a variety or functor, return it as a general ModelDecl, else null.

Definition at line 91 of file TypeRef.h.

SigInstanceDecl* comma::TypeRef::getSigInstanceDecl (  )  const [inline]

If this references a signature instance, return it, else null.

Definition at line 106 of file TypeRef.h.

TypeDecl* comma::TypeRef::getTypeDecl (  )  const [inline]

If this references a type declaration, return it, else null.

Definition at line 111 of file TypeRef.h.

VarietyDecl* comma::TypeRef::getVarietyDecl (  )  const [inline]

If this references a variety, return it, else null.

Definition at line 96 of file TypeRef.h.

bool comma::TypeRef::isComplete (  )  const [inline]

Returns true if this is a complete reference.

Definition at line 64 of file TypeRef.h.

bool comma::TypeRef::isIncomplete (  )  const [inline]

Returns true if this is a incomplete reference.

Definition at line 59 of file TypeRef.h.

bool comma::TypeRef::referencesFunctor (  )  const [inline]

Returns true if this is an incomplete functor reference.

Definition at line 72 of file TypeRef.h.

bool comma::TypeRef::referencesSigInstance (  )  const [inline]

Returns true if this is a complete reference to a signature instance.

Definition at line 77 of file TypeRef.h.

bool comma::TypeRef::referencesTypeDecl (  )  const [inline]

Returns true if this is a complete reference to a TypeDecl.

Definition at line 82 of file TypeRef.h.

bool comma::TypeRef::referencesVariety (  )  const [inline]

Returns true if this is an incomplete variety reference.

Definition at line 67 of file TypeRef.h.


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

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1