comma::DeclRewriter Class Reference

#include <DeclRewriter.h>

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

List of all members.

Public Member Functions

 DeclRewriter (AstResource &resource, DeclRegion *context, DeclRegion *origin)
 DeclRewriter (const AstRewriter &rewrites, DeclRegion *context, DeclRegion *origin)
 Constructs a DeclRewriter using an existing AstRewriter.
void setContext (DeclRegion *context)
void setOrigin (DeclRegion *origin)
DeclrewriteDecl (Decl *decl)
 Rewrites the given declaration node.



const DeclRegiongetContext () const
 Returns the current context associated with this rewriter.
DeclRegiongetContext ()
 Returns the current context associated with this rewriter.
const DeclRegiongetOrigin () const
 Returns the current origin associated with this rewriter.
DeclRegiongetOrigin ()
 Returns the current context associated with this rewriter.
Declaration rewrite methods.

The following method rewrite declaration nodes. A new declaration node is always returned regardless of whether any rewrite rules applied. The declarative region to which the new node belongs is the one supplied to this rewritors ctor.



TypeDeclrewriteTypeDecl (TypeDecl *tdecl)
FunctionDeclrewriteFunctionDecl (FunctionDecl *fdecl)
ProcedureDeclrewriteProcedureDecl (ProcedureDecl *pdecl)
EnumerationDeclrewriteEnumerationDecl (EnumerationDecl *edecl)
ArrayDeclrewriteArrayDecl (ArrayDecl *adecl)
IntegerDeclrewriteIntegerDecl (IntegerDecl *idecl)
RecordDeclrewriteRecordDecl (RecordDecl *rdecl)
IncompleteTypeDeclrewriteIncompleteTypeDecl (IncompleteTypeDecl *ITD)
AccessDeclrewriteAccessDecl (AccessDecl *access)
CarrierDeclrewriteCarrierDecl (CarrierDecl *carrier)

Detailed Description

Definition at line 25 of file DeclRewriter.h.


Constructor & Destructor Documentation

comma::DeclRewriter::DeclRewriter ( AstResource resource,
DeclRegion context,
DeclRegion origin 
) [inline]

Constructs a DeclRewriter using the given AstResource to generate new AST nodes. The context parameter defines the declarative region in which any rewritten declarations are to be declared in. The origin parameter defines the source of the declarations to be rewritten. The resulting rewriter does not contain any rewrite rules.

Definition at line 34 of file DeclRewriter.h.

comma::DeclRewriter::DeclRewriter ( const AstRewriter rewrites,
DeclRegion context,
DeclRegion origin 
) [inline]

Constructs a DeclRewriter using an existing AstRewriter.

Definition at line 39 of file DeclRewriter.h.


Member Function Documentation

DeclRegion* comma::DeclRewriter::getContext (  )  [inline]

Returns the current context associated with this rewriter.

Definition at line 64 of file DeclRewriter.h.

const DeclRegion* comma::DeclRewriter::getContext (  )  const [inline]

Returns the current context associated with this rewriter.

Definition at line 63 of file DeclRewriter.h.

DeclRegion* comma::DeclRewriter::getOrigin (  )  [inline]

Returns the current context associated with this rewriter.

Definition at line 70 of file DeclRewriter.h.

const DeclRegion* comma::DeclRewriter::getOrigin (  )  const [inline]

Returns the current origin associated with this rewriter.

Definition at line 69 of file DeclRewriter.h.

AccessDecl * DeclRewriter::rewriteAccessDecl ( AccessDecl access  ) 

FIXME: Array types will eventually have primitive operations defined on them. Generate and mirror the results.

Definition at line 258 of file DeclRewriter.cpp.

ArrayDecl * DeclRewriter::rewriteArrayDecl ( ArrayDecl adecl  ) 

FIXME: Array types will eventually have primitive operations defined on them. Generate and mirror the results.

Definition at line 132 of file DeclRewriter.cpp.

CarrierDecl * DeclRewriter::rewriteCarrierDecl ( CarrierDecl carrier  ) 

FIXME: Array types will eventually have primitive operations defined on them. Generate and mirror the results.

Definition at line 243 of file DeclRewriter.cpp.

Decl * DeclRewriter::rewriteDecl ( Decl decl  ) 

Rewrites the given declaration node.

Definition at line 333 of file DeclRewriter.cpp.

EnumerationDecl * DeclRewriter::rewriteEnumerationDecl ( EnumerationDecl edecl  ) 

FIXME: Array types will eventually have primitive operations defined on them. Generate and mirror the results.

Definition at line 95 of file DeclRewriter.cpp.

FunctionDecl * DeclRewriter::rewriteFunctionDecl ( FunctionDecl fdecl  ) 

FIXME: Array types will eventually have primitive operations defined on them. Generate and mirror the results.

Definition at line 49 of file DeclRewriter.cpp.

IncompleteTypeDecl * DeclRewriter::rewriteIncompleteTypeDecl ( IncompleteTypeDecl ITD  ) 

FIXME: Array types will eventually have primitive operations defined on them. Generate and mirror the results.

Definition at line 219 of file DeclRewriter.cpp.

IntegerDecl * DeclRewriter::rewriteIntegerDecl ( IntegerDecl idecl  ) 

FIXME: Array types will eventually have primitive operations defined on them. Generate and mirror the results.

Definition at line 165 of file DeclRewriter.cpp.

ProcedureDecl * DeclRewriter::rewriteProcedureDecl ( ProcedureDecl pdecl  ) 

FIXME: Array types will eventually have primitive operations defined on them. Generate and mirror the results.

Definition at line 72 of file DeclRewriter.cpp.

RecordDecl * DeclRewriter::rewriteRecordDecl ( RecordDecl rdecl  ) 

FIXME: Array types will eventually have primitive operations defined on them. Generate and mirror the results.

Definition at line 192 of file DeclRewriter.cpp.

TypeDecl * DeclRewriter::rewriteTypeDecl ( TypeDecl tdecl  ) 

FIXME: Array types will eventually have primitive operations defined on them. Generate and mirror the results.

Definition at line 290 of file DeclRewriter.cpp.

void comma::DeclRewriter::setContext ( DeclRegion context  )  [inline]

Switches the context associated with this decl rewriter.

Note:
It is only permited to switch a DeclRewriter to a context which is immediately enclosed by the currently active context.

Definition at line 47 of file DeclRewriter.h.

void comma::DeclRewriter::setOrigin ( DeclRegion origin  )  [inline]

Switches the origin associated with this decl rewriter.

Note:
It is only permited to switch a DeclRewriter to an origin which is immediately enclosed by the currently active origin.

Definition at line 56 of file DeclRewriter.h.


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

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1