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

comma::Decl Class Reference

#include <Decl.h>

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

List of all members.

Public Member Functions

virtual ~Decl ()
IdentifierInfogetIdInfo () const
const char * getString () const
Location getLocation () const
void setDeclRegion (DeclRegion *region)
DeclRegiongetDeclRegion ()
const DeclRegiongetDeclRegion () const
bool isDeclaredIn (const DeclRegion *region) const
DeclRegionasDeclRegion ()
DeclgetOrigin ()
const DeclgetOrigin () const
bool hasOrigin () const
 Returns true if this decl has an origin.
void setOrigin (Decl *decl)
 Sets the origin of this decl.
DeclresolveOrigin ()
 Walks the chain of origins returning the final non-null declaration;.
const DeclresolveOrigin () const
bool isImmediate () const

Static Public Member Functions

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

Protected Member Functions

 Decl (AstKind kind, IdentifierInfo *info=0, Location loc=0, DeclRegion *region=0)

Protected Attributes

IdentifierInfoidInfo
Location location
DeclRegioncontext
Declorigin

Detailed Description

Definition at line 32 of file Decl.h.


Constructor & Destructor Documentation

virtual comma::Decl::~Decl (  )  [inline, virtual]

Definition at line 35 of file Decl.h.

comma::Decl::Decl ( AstKind  kind,
IdentifierInfo info = 0,
Location  loc = 0,
DeclRegion region = 0 
) [inline, protected]

Definition at line 114 of file Decl.h.


Member Function Documentation

DeclRegion * Decl::asDeclRegion (  ) 

Returns this cast to a DeclRegion, or null if this decl is not also a declarative region.

Definition at line 32 of file Decl.cpp.

static bool comma::Decl::classof ( const Ast node  )  [inline, static]
static bool comma::Decl::classof ( const Decl node  )  [inline, static]
const DeclRegion* comma::Decl::getDeclRegion (  )  const [inline]

Reimplemented in comma::EnumLiteral, and comma::ComponentDecl.

Definition at line 61 of file Decl.h.

DeclRegion* comma::Decl::getDeclRegion (  )  [inline]

Reimplemented in comma::EnumLiteral, and comma::ComponentDecl.

Definition at line 60 of file Decl.h.

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

Definition at line 39 of file Decl.h.

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

Accesses the location of this node.

If no location information is available, or if this node was created internally by the compiler, an invalid location object (queriable by Location::isValid()) is returned.

Reimplemented from comma::Ast.

Definition at line 48 of file Decl.h.

const Decl* comma::Decl::getOrigin (  )  const [inline]

Reimplemented in comma::SubroutineDecl.

Definition at line 82 of file Decl.h.

Decl* comma::Decl::getOrigin (  )  [inline]

Returns the origin of this decl, or null if there is no associated origin.

A declaration has an origin if it is not an immediate declaration. That is to say, the declaration was implicitly generated due to inheritance from a supersignature. The returned node is the actual declaration object provided by some supersignature.

See also:
isImmediate

Reimplemented in comma::SubroutineDecl.

Definition at line 81 of file Decl.h.

const char* comma::Decl::getString (  )  const [inline]

Definition at line 43 of file Decl.h.

bool comma::Decl::hasOrigin (  )  const [inline]

Returns true if this decl has an origin.

Definition at line 85 of file Decl.h.

bool comma::Decl::isDeclaredIn ( const DeclRegion region  )  const [inline]

Definition at line 64 of file Decl.h.

bool comma::Decl::isImmediate (  )  const [inline]

Returns true if this declaration is immediate.

An immediate declaration is one which directly corresponds to a declaration voiced in the source code -- as opposed to one implicitly generated by the compiler. The canonical example of a non-immediate declaration is one which was inherited from a supersignature.

Definition at line 105 of file Decl.h.

const Decl* comma::Decl::resolveOrigin (  )  const [inline]

Reimplemented in comma::SubroutineDecl.

Definition at line 95 of file Decl.h.

Decl * Decl::resolveOrigin (  ) 

Walks the chain of origins returning the final non-null declaration;.

Reimplemented in comma::SubroutineDecl.

Definition at line 58 of file Decl.cpp.

void comma::Decl::setDeclRegion ( DeclRegion region  )  [inline]

Definition at line 52 of file Decl.h.

void comma::Decl::setOrigin ( Decl decl  )  [inline]

Sets the origin of this decl.

Definition at line 88 of file Decl.h.


Member Data Documentation

Definition at line 127 of file Decl.h.

Definition at line 125 of file Decl.h.

Definition at line 126 of file Decl.h.

Decl* comma::Decl::origin [protected]

Definition at line 128 of file Decl.h.


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

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1