cfront::NameDescription Class Reference

#include <NameDescription.hpp>

Collaboration diagram for cfront::NameDescription:

Collaboration graph
[legend]

Public Types

enum  DeclarationLocation {
  NONE, TOPLEVEL, PARAMETER, BLOCK,
  FIELD, ENUM
}
enum  StorageClassSpecTag {
  SS_NONE, DEFAULT, AUTO, REGISTER,
  EXTERN, STATIC, TYPEDEF
}
typedef std::list< Extension * > Extensions

Public Member Functions

 NameDescription ()
 NameDescription (Type *t, StorageClassSpecTag ss, DeclarationLocation l)
 NameDescription (const NameDescription &other)
 ~NameDescription ()
TypegetType () const
StorageClassSpecTag getStorageClassSpec () const
DeclarationLocation getLocation () const
ConstantValue getConstantValue () const
const ExtensionsgetExtensions () const
void setType (Type *t)
void setConstantValue (const ConstantValue &v)
void addExtension (Extension *e)

Private Attributes

Typetype_
StorageClassSpecTag storageClassSpec_
DeclarationLocation location_
ConstantValue constantValue_
Extensions extensions_

Detailed Description

This class holds the information to the ordinary names (variable names, function names, typedef names, enum constants)

Definition at line 47 of file NameDescription.hpp.


Member Typedef Documentation

Definition at line 75 of file NameDescription.hpp.


Member Enumeration Documentation

The constants of the location that the name is occurred.

Enumerator:
NONE 
TOPLEVEL  Top level of the file
PARAMETER  Function parameter
BLOCK  Within blocks
FIELD  Struct on union field
ENUM  Enumerator

Definition at line 53 of file NameDescription.hpp.

The constants of storage class specifiers.

Enumerator:
SS_NONE 
DEFAULT  Not specified.
AUTO  'auto'
REGISTER  'register'
EXTERN  'extern'
STATIC  'static'
TYPEDEF  'typedef'

Definition at line 65 of file NameDescription.hpp.


Constructor & Destructor Documentation

cfront::NameDescription::NameDescription (  )  [inline]

Definition at line 77 of file NameDescription.hpp.

cfront::NameDescription::NameDescription ( Type t,
StorageClassSpecTag  ss,
DeclarationLocation  l 
) [inline]

Definition at line 82 of file NameDescription.hpp.

cfront::NameDescription::NameDescription ( const NameDescription other  )  [inline]

Definition at line 88 of file NameDescription.hpp.

cfront::NameDescription::~NameDescription (  )  [inline]

Definition at line 94 of file NameDescription.hpp.

References extensions_.


Member Function Documentation

Type* cfront::NameDescription::getType (  )  const [inline]

StorageClassSpecTag cfront::NameDescription::getStorageClassSpec (  )  const [inline]

Definition at line 107 of file NameDescription.hpp.

References storageClassSpec_.

Referenced by cfront::CAnalyzer::isTypedefName().

DeclarationLocation cfront::NameDescription::getLocation (  )  const [inline]

Definition at line 112 of file NameDescription.hpp.

References location_.

Referenced by cfront::CAnalyzer::evalConstExpr().

ConstantValue cfront::NameDescription::getConstantValue (  )  const [inline]

Get the constant value of the name.

This member function is used for the enumerator name.

Definition at line 122 of file NameDescription.hpp.

References constantValue_.

Referenced by cfront::CAnalyzer::evalConstExpr().

const Extensions& cfront::NameDescription::getExtensions (  )  const [inline]

Definition at line 127 of file NameDescription.hpp.

References extensions_.

void cfront::NameDescription::setType ( Type t  )  [inline]

Definition at line 132 of file NameDescription.hpp.

References type_.

Referenced by cfront::Environment::addOrdinaryName(), and cfront::Environment::addTagName().

void cfront::NameDescription::setConstantValue ( const ConstantValue v  )  [inline]

Set the constant value of the name.

This member function is used for the enumerator name.

Definition at line 142 of file NameDescription.hpp.

References constantValue_.

void cfront::NameDescription::addExtension ( Extension e  )  [inline]

Definition at line 147 of file NameDescription.hpp.

References extensions_.

Referenced by cfront::CAnalyzer::setVariableAttribute().


Field Documentation

Definition at line 153 of file NameDescription.hpp.

Referenced by getType(), and setType().

Definition at line 154 of file NameDescription.hpp.

Referenced by getStorageClassSpec().

Definition at line 155 of file NameDescription.hpp.

Referenced by getLocation().

Definition at line 156 of file NameDescription.hpp.

Referenced by getConstantValue(), and setConstantValue().

Used by enumerator

Definition at line 157 of file NameDescription.hpp.

Referenced by addExtension(), getExtensions(), and ~NameDescription().


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

Generated on Tue Mar 31 20:19:53 2009 for ctrump by  doxygen 1.5.6