comma::DeclRegion Class Reference

#include <DeclRegion.h>

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

List of all members.

Classes

class  PredIter

Public Types

typedef DeclarationTable::iterator DeclIter
typedef
DeclarationTable::const_iterator 
ConstDeclIter
typedef
DeclarationTable::reverse_iterator 
reverse_decl_iter
typedef
DeclarationTable::const_reverse_iterator 
const_reverse_decl_iter
typedef std::pair< PredIter,
PredIter
PredRange

Public Member Functions

DeclRegiongetParent ()
const DeclRegiongetParent () const
void setParent (DeclRegion *parentRegion)
void addDecl (Decl *decl)
unsigned countDecls () const
DeclIter beginDecls ()
DeclIter endDecls ()
ConstDeclIter beginDecls () const
ConstDeclIter endDecls () const
reverse_decl_iter rbegin_decls ()
reverse_decl_iter rend_decls ()
const_reverse_decl_iter rbegin_decls () const
const_reverse_decl_iter rend_decls () const
PredRange findDecls (IdentifierInfo *name) const
bool containsDecl (IdentifierInfo *name) const
bool containsDecl (const Decl *decl) const
DeclfindDecl (IdentifierInfo *name, Type *type)
bool removeDecl (Decl *decl)
bool collectFunctionDecls (IdentifierInfo *name, llvm::SmallVectorImpl< SubroutineDecl * > &dst)
bool collectProcedureDecls (IdentifierInfo *name, llvm::SmallVectorImpl< SubroutineDecl * > &dst)
AstasAst ()
const AstasAst () const
void addObserver (DeclRegion *region)
void addDeclarationsUsingRewrites (DeclRewriter &rewrites, const DeclRegion *region)
 Adds the declarations from the given region to this one using the supplied rewrite rules.
void addDeclarationUsingRewrites (DeclRewriter &rewrites, Decl *decl)
 Adds the given declaration to this region using the supplied rewrite rules.



const DeclgetDecl (unsigned i) const
 Returns the i'th declaration provided by this region.
DeclgetDecl (unsigned i)
 Returns the i'th declaration provided by this region.

Static Public Member Functions

static bool classof (const Ast *node)
static bool classof (const AddDecl *node)
static bool classof (const ProcedureDecl *node)
static bool classof (const FunctionDecl *node)
static bool classof (const BlockStmt *node)
static bool classof (const IntegerDecl *node)
static bool classof (const PercentDecl *node)
static bool classof (const RecordDecl *node)
static bool classof (const ArrayDecl *node)
static bool classof (const AccessDecl *node)
static bool classof (const DomainInstanceDecl *node)
static bool classof (const AbstractDomainDecl *node)
static bool classof (const EnumerationDecl *node)

Protected Types

typedef std::vector< Decl * > DeclarationTable

Protected Member Functions

 DeclRegion (Ast::AstKind kind)
 DeclRegion (Ast::AstKind kind, DeclRegion *parent)
virtual void notifyAddDecl (Decl *decl)
virtual void notifyRemoveDecl (Decl *decl)

Protected Attributes

DeclarationTable declarations

Detailed Description

Definition at line 24 of file DeclRegion.h.


Member Typedef Documentation

typedef DeclarationTable::const_reverse_iterator comma::DeclRegion::const_reverse_decl_iter

Definition at line 80 of file DeclRegion.h.

typedef DeclarationTable::const_iterator comma::DeclRegion::ConstDeclIter

Definition at line 72 of file DeclRegion.h.

typedef std::vector<Decl*> comma::DeclRegion::DeclarationTable [protected]

Definition at line 33 of file DeclRegion.h.

typedef DeclarationTable::iterator comma::DeclRegion::DeclIter

Definition at line 68 of file DeclRegion.h.

Definition at line 168 of file DeclRegion.h.

typedef DeclarationTable::reverse_iterator comma::DeclRegion::reverse_decl_iter

Definition at line 76 of file DeclRegion.h.


Constructor & Destructor Documentation

comma::DeclRegion::DeclRegion ( Ast::AstKind  kind  )  [inline, protected]

Definition at line 27 of file DeclRegion.h.

comma::DeclRegion::DeclRegion ( Ast::AstKind  kind,
DeclRegion parent 
) [inline, protected]

Definition at line 30 of file DeclRegion.h.


Member Function Documentation

void DeclRegion::addDecl ( Decl decl  ) 

Definition at line 29 of file DeclRegion.cpp.

void DeclRegion::addDeclarationsUsingRewrites ( DeclRewriter rewrites,
const DeclRegion region 
)

Adds the declarations from the given region to this one using the supplied rewrite rules.

This method is intended to support subclasses which have some subset of their declarative regions defined in terms of another declaration. For example, domain instances are a rewritten version of the domains PercentDecl.

Definition at line 41 of file DeclRegion.cpp.

void DeclRegion::addDeclarationUsingRewrites ( DeclRewriter rewrites,
Decl decl 
)

Adds the given declaration to this region using the supplied rewrite rules.

Definition at line 34 of file DeclRegion.cpp.

void comma::DeclRegion::addObserver ( DeclRegion region  )  [inline]

Definition at line 205 of file DeclRegion.h.

const Ast * DeclRegion::asAst (  )  const

Definition at line 130 of file DeclRegion.cpp.

Ast * DeclRegion::asAst (  ) 

Definition at line 163 of file DeclRegion.cpp.

ConstDeclIter comma::DeclRegion::beginDecls (  )  const [inline]

Definition at line 73 of file DeclRegion.h.

DeclIter comma::DeclRegion::beginDecls (  )  [inline]

Definition at line 69 of file DeclRegion.h.

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

Definition at line 252 of file DeclRegion.h.

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

Definition at line 251 of file DeclRegion.h.

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

Definition at line 250 of file DeclRegion.h.

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

Definition at line 249 of file DeclRegion.h.

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

Definition at line 248 of file DeclRegion.h.

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

Definition at line 247 of file DeclRegion.h.

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

Definition at line 246 of file DeclRegion.h.

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

Definition at line 245 of file DeclRegion.h.

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

Definition at line 244 of file DeclRegion.h.

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

Definition at line 243 of file DeclRegion.h.

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

Definition at line 242 of file DeclRegion.h.

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

Definition at line 241 of file DeclRegion.h.

static bool comma::DeclRegion::classof ( const Ast node  )  [inline, static]
bool DeclRegion::collectFunctionDecls ( IdentifierInfo name,
llvm::SmallVectorImpl< SubroutineDecl * > &  dst 
)

Definition at line 104 of file DeclRegion.cpp.

bool DeclRegion::collectProcedureDecls ( IdentifierInfo name,
llvm::SmallVectorImpl< SubroutineDecl * > &  dst 
)

Definition at line 117 of file DeclRegion.cpp.

bool DeclRegion::containsDecl ( const Decl decl  )  const

Definition at line 96 of file DeclRegion.cpp.

bool comma::DeclRegion::containsDecl ( IdentifierInfo name  )  const [inline]

Definition at line 173 of file DeclRegion.h.

unsigned comma::DeclRegion::countDecls (  )  const [inline]

Definition at line 54 of file DeclRegion.h.

ConstDeclIter comma::DeclRegion::endDecls (  )  const [inline]

Definition at line 74 of file DeclRegion.h.

DeclIter comma::DeclRegion::endDecls (  )  [inline]

Definition at line 70 of file DeclRegion.h.

Decl * DeclRegion::findDecl ( IdentifierInfo name,
Type type 
)

Definition at line 49 of file DeclRegion.cpp.

DeclRegion::PredRange DeclRegion::findDecls ( IdentifierInfo name  )  const

Definition at line 71 of file DeclRegion.cpp.

Decl* comma::DeclRegion::getDecl ( unsigned  i  )  [inline]

Returns the i'th declaration provided by this region.

Definition at line 62 of file DeclRegion.h.

const Decl* comma::DeclRegion::getDecl ( unsigned  i  )  const [inline]

Returns the i'th declaration provided by this region.

Definition at line 58 of file DeclRegion.h.

const DeclRegion* comma::DeclRegion::getParent (  )  const [inline]

Definition at line 38 of file DeclRegion.h.

DeclRegion* comma::DeclRegion::getParent (  )  [inline]

Definition at line 37 of file DeclRegion.h.

void DeclRegion::notifyAddDecl ( Decl decl  )  [protected, virtual]

Definition at line 170 of file DeclRegion.cpp.

void DeclRegion::notifyRemoveDecl ( Decl decl  )  [protected, virtual]

Definition at line 173 of file DeclRegion.cpp.

const_reverse_decl_iter comma::DeclRegion::rbegin_decls (  )  const [inline]

Definition at line 81 of file DeclRegion.h.

reverse_decl_iter comma::DeclRegion::rbegin_decls (  )  [inline]

Definition at line 77 of file DeclRegion.h.

bool DeclRegion::removeDecl ( Decl decl  ) 

Definition at line 86 of file DeclRegion.cpp.

const_reverse_decl_iter comma::DeclRegion::rend_decls (  )  const [inline]

Definition at line 82 of file DeclRegion.h.

reverse_decl_iter comma::DeclRegion::rend_decls (  )  [inline]

Definition at line 78 of file DeclRegion.h.

void comma::DeclRegion::setParent ( DeclRegion parentRegion  )  [inline]

Definition at line 42 of file DeclRegion.h.


Member Data Documentation

Definition at line 34 of file DeclRegion.h.


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

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1