comma::Resolver Class Reference

#include <Resolver.h>

Collaboration diagram for comma::Resolver:
Collaboration graph
[legend]

List of all members.

Classes

struct  ArityPred
struct  NullaryPred
struct  TypePred

Public Types

typedef DeclVector::iterator direct_overload_iter
typedef DeclVector::iterator indirect_overload_iter
typedef ValueVector::iterator indirect_value_iter
typedef TypeVector::iterator indirect_type_iter

Public Member Functions

bool resolve (IdentifierInfo *idInfo)
bool filterOverloadsWRTArity (unsigned arity)
bool filterProcedures ()
bool filterFunctionals ()
bool filterNullaryOverloads ()
IdentifierInfogetIdInfo () const
 Returns the IdentifierInfo this resolver is associated with.
unsigned numDirectOverloads () const
 Returns the number of direct overloads.
unsigned numIndirectValues () const
 Returns the number of indirect values.
unsigned numIndirectTypes () const
 Returns the number of indirect types.
unsigned numIndirectExceptions () const
 Returns the number of indirect exceptions.
unsigned numIndirectOverloads () const
 Returns the number of indirect overloads.
unsigned numResolvedDecls () const
 Returns the total number of declarations contained in this resolver.
unsigned numOverloads () const
 Returns the total number of overloaded declarations.
bool hasDirectValue () const
 Returns true if a direct value has been resolved.
bool hasDirectType () const
 Returns true if a direct type has been resolved.
bool hasDirectCapsule () const
 Returns true if a direct capsule has been resolved.
bool hasDirectException () const
 Returns true if a direct exception has been resolved.
bool hasDirectOverloads () const
 Returns true if direct overloads have been resolved.
bool hasIndirectValues () const
 Returns true if indirect values have been resolved.
bool hasIndirectTypes () const
 Returns true if indirect types have been resolved.
bool hasIndirectExceptions () const
 Returns true if indirect exceptions have been resolved.
bool hasIndirectOverloads () const
 Returns true if indirect overloads have been resolved.
bool hasVisibleIndirectValue () const
 Returns true if there is a unique visible indirect value.
bool hasVisibleIndirectType () const
 Returns true if there is a unique visible indirect type.
bool hasVisibleIndirectOverloads () const
 Returns true if there are visible indirect overloads.
ValueDeclgetDirectValue () const
TypeDeclgetDirectType () const
ModelDeclgetDirectCapsule () const
ExceptionDeclgetDirectException () const
DeclgetDirectOverload (unsigned i) const
 Returns the i'th direct overload. The index must be in range.
ValueDeclgetIndirectValue (unsigned i) const
 Returns the i'th indirect value. The index must be in range.
TypeDeclgetIndirectType (unsigned i) const
 Returns the i'th indirect type. The index must be in range.
ExceptionDeclgetIndirectException (unsigned i) const
 Returns the i'th indirect exception. The index must be in range.
DeclgetIndirectOverload (unsigned i) const
 Returns the i'th indirect overload. The index must be in range.
bool getVisibleSubroutines (llvm::SmallVectorImpl< SubroutineDecl * > &srDecls)
direct_overload_iter begin_direct_overloads ()
direct_overload_iter end_direct_overloads ()
indirect_overload_iter begin_indirect_overloads ()
indirect_overload_iter end_indirect_overloads ()
indirect_value_iter begin_indirect_values ()
indirect_value_iter end_indirect_values ()
indirect_type_iter begin_indirect_types ()
indirect_type_iter end_indirect_types ()

Friends

class Scope

Detailed Description

Definition at line 19 of file Resolver.h.


Member Typedef Documentation

typedef DeclVector::iterator comma::Resolver::direct_overload_iter

Definition at line 204 of file Resolver.h.

typedef DeclVector::iterator comma::Resolver::indirect_overload_iter

Definition at line 205 of file Resolver.h.

typedef TypeVector::iterator comma::Resolver::indirect_type_iter

Definition at line 207 of file Resolver.h.

typedef ValueVector::iterator comma::Resolver::indirect_value_iter

Definition at line 206 of file Resolver.h.


Member Function Documentation

direct_overload_iter comma::Resolver::begin_direct_overloads (  )  [inline]

Definition at line 209 of file Resolver.h.

indirect_overload_iter comma::Resolver::begin_indirect_overloads (  )  [inline]

Definition at line 216 of file Resolver.h.

indirect_type_iter comma::Resolver::begin_indirect_types (  )  [inline]

Definition at line 231 of file Resolver.h.

indirect_value_iter comma::Resolver::begin_indirect_values (  )  [inline]

Definition at line 223 of file Resolver.h.

direct_overload_iter comma::Resolver::end_direct_overloads (  )  [inline]

Definition at line 212 of file Resolver.h.

indirect_overload_iter comma::Resolver::end_indirect_overloads (  )  [inline]

Definition at line 219 of file Resolver.h.

indirect_type_iter comma::Resolver::end_indirect_types (  )  [inline]

Definition at line 235 of file Resolver.h.

indirect_value_iter comma::Resolver::end_indirect_values (  )  [inline]

Definition at line 227 of file Resolver.h.

bool Resolver::filterFunctionals (  ) 

Filters out all functional declarations (functions and numeration literals) from the results and returns true if the resolver was modified.

Definition at line 64 of file Resolver.cpp.

bool Resolver::filterNullaryOverloads (  ) 

Filters out all nullary overloads (procedures and functions of arity 0, as well as enumeration literals). Returns true if the resolver was modified.

Definition at line 71 of file Resolver.cpp.

bool Resolver::filterOverloadsWRTArity ( unsigned  arity  ) 

Filters the overloaded results, keeping only those overloads with the specified arity. Returns true if the filter modified the result.

Definition at line 54 of file Resolver.cpp.

bool Resolver::filterProcedures (  ) 

Filters out all procedure declarations from the results and returns true if the resolver was modified.

Definition at line 59 of file Resolver.cpp.

ModelDecl* comma::Resolver::getDirectCapsule (  )  const [inline]

Returns the direct capsule associated with this resolver, or 0 if no such declaration could be resolved.

Definition at line 159 of file Resolver.h.

ExceptionDecl* comma::Resolver::getDirectException (  )  const [inline]

Returns the direct exception associated with this resolver, or null if no such declaration could be resolved.

Definition at line 165 of file Resolver.h.

Decl* comma::Resolver::getDirectOverload ( unsigned  i  )  const [inline]

Returns the i'th direct overload. The index must be in range.

Definition at line 170 of file Resolver.h.

TypeDecl* comma::Resolver::getDirectType (  )  const [inline]

Returns the direct type associated with this resolver, or 0 if no such declaration could be resolved.

Definition at line 153 of file Resolver.h.

ValueDecl* comma::Resolver::getDirectValue (  )  const [inline]

Returns the direct value associated with this resolver, or 0 if no such declaration could be resolved.

Definition at line 147 of file Resolver.h.

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

Returns the IdentifierInfo this resolver is associated with.

Definition at line 63 of file Resolver.h.

ExceptionDecl* comma::Resolver::getIndirectException ( unsigned  i  )  const [inline]

Returns the i'th indirect exception. The index must be in range.

Definition at line 188 of file Resolver.h.

Decl* comma::Resolver::getIndirectOverload ( unsigned  i  )  const [inline]

Returns the i'th indirect overload. The index must be in range.

Definition at line 194 of file Resolver.h.

TypeDecl* comma::Resolver::getIndirectType ( unsigned  i  )  const [inline]

Returns the i'th indirect type. The index must be in range.

Definition at line 182 of file Resolver.h.

ValueDecl* comma::Resolver::getIndirectValue ( unsigned  i  )  const [inline]

Returns the i'th indirect value. The index must be in range.

Definition at line 176 of file Resolver.h.

bool Resolver::getVisibleSubroutines ( llvm::SmallVectorImpl< SubroutineDecl * > &  srDecls  ) 

Returns a vector of all visible subroutine declarations. Returns true if any visible subroutines were found.

Definition at line 147 of file Resolver.cpp.

bool comma::Resolver::hasDirectCapsule (  )  const [inline]

Returns true if a direct capsule has been resolved.

Definition at line 101 of file Resolver.h.

bool comma::Resolver::hasDirectException (  )  const [inline]

Returns true if a direct exception has been resolved.

Definition at line 106 of file Resolver.h.

bool comma::Resolver::hasDirectOverloads (  )  const [inline]

Returns true if direct overloads have been resolved.

Definition at line 111 of file Resolver.h.

bool comma::Resolver::hasDirectType (  )  const [inline]

Returns true if a direct type has been resolved.

Definition at line 96 of file Resolver.h.

bool comma::Resolver::hasDirectValue (  )  const [inline]

Returns true if a direct value has been resolved.

Definition at line 91 of file Resolver.h.

bool comma::Resolver::hasIndirectExceptions (  )  const [inline]

Returns true if indirect exceptions have been resolved.

Definition at line 120 of file Resolver.h.

bool comma::Resolver::hasIndirectOverloads (  )  const [inline]

Returns true if indirect overloads have been resolved.

Definition at line 123 of file Resolver.h.

bool comma::Resolver::hasIndirectTypes (  )  const [inline]

Returns true if indirect types have been resolved.

Definition at line 117 of file Resolver.h.

bool comma::Resolver::hasIndirectValues (  )  const [inline]

Returns true if indirect values have been resolved.

Definition at line 114 of file Resolver.h.

bool comma::Resolver::hasVisibleIndirectOverloads (  )  const [inline]

Returns true if there are visible indirect overloads.

Definition at line 140 of file Resolver.h.

bool comma::Resolver::hasVisibleIndirectType (  )  const [inline]

Returns true if there is a unique visible indirect type.

Definition at line 134 of file Resolver.h.

bool comma::Resolver::hasVisibleIndirectValue (  )  const [inline]

Returns true if there is a unique visible indirect value.

Definition at line 128 of file Resolver.h.

unsigned comma::Resolver::numDirectOverloads (  )  const [inline]

Returns the number of direct overloads.

Definition at line 66 of file Resolver.h.

unsigned comma::Resolver::numIndirectExceptions (  )  const [inline]

Returns the number of indirect exceptions.

Definition at line 75 of file Resolver.h.

unsigned comma::Resolver::numIndirectOverloads (  )  const [inline]

Returns the number of indirect overloads.

Definition at line 78 of file Resolver.h.

unsigned comma::Resolver::numIndirectTypes (  )  const [inline]

Returns the number of indirect types.

Definition at line 72 of file Resolver.h.

unsigned comma::Resolver::numIndirectValues (  )  const [inline]

Returns the number of indirect values.

Definition at line 69 of file Resolver.h.

unsigned comma::Resolver::numOverloads (  )  const [inline]

Returns the total number of overloaded declarations.

Definition at line 86 of file Resolver.h.

unsigned Resolver::numResolvedDecls (  )  const

Returns the total number of declarations contained in this resolver.

Definition at line 42 of file Resolver.cpp.

bool Resolver::resolve ( IdentifierInfo idInfo  ) 

Resolves the given identifier and returns true if any bindings were resolved.

Definition at line 137 of file Resolver.cpp.


Friends And Related Function Documentation

friend class Scope [friend]

Definition at line 36 of file Resolver.h.


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

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1