Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Variable_symbol Class Reference

#include <variable.h>

Inheritance diagram for Variable_symbol:

Inheritance graph
[legend]
Collaboration diagram for Variable_symbol:

Collaboration graph
[legend]
List of all members.

Public Methods

Type get_type () const
Storage_class_specifier get_storage_class () const
bool has_address () const
Ptreeget_initializer () const
Ptreeget_bitsize () const
bool is_member_variable () const
 Variable_symbol (Type type, Storage_class_specifier storage, Ptree *initializer, Ptree *bitsize, Symbol::Status status)
 This ctor is used for variables. More...

 Variable_symbol (Type type, Storage_class_specifier storage, Ptree *initializer, Ptree *bitsize, bool has_address)
 This ctor is used for enum values. More...

Symbol::Kind get_kind () const
void set_class (Class_symbol *csym)
Class_symbolget_class () const
void define_variable (Storage_class_specifier storage, Ptree *initializer, Ptree *bitsize, Status status)
void dump (std::ostream &os)
 Dump symbol on /out/. More...


Private Attributes

Type type
Storage_class_specifier storage_class
Ptreeinitializer
Ptreebitsize
bool has_addr
Class_symbolin_class

Constructor & Destructor Documentation

Variable_symbol::Variable_symbol Type    type,
Storage_class_specifier    storage,
Ptree   initializer,
Ptree   bitsize,
Symbol::Status    status
 

This ctor is used for variables.

Definition at line 11 of file variable.cc.

References Symbol::set_status(), Symbol::Status, and Storage_class_specifier.

Variable_symbol::Variable_symbol Type    type,
Storage_class_specifier    storage,
Ptree   initializer,
Ptree   bitsize,
bool    has_address
 

This ctor is used for enum values.

Definition at line 25 of file variable.cc.

References Symbol::set_status(), Symbol::st_Defined, and Storage_class_specifier.


Member Function Documentation

void Variable_symbol::define_variable Storage_class_specifier    storage,
Ptree   initializer,
Ptree   bitsize,
Status    status
 

Definition at line 55 of file variable.cc.

References Symbol::set_status(), storage_class, and Storage_class_specifier.

Referenced by Namespace_scope::add_variable().

void Variable_symbol::dump std::ostream &    os [virtual]
 

Dump symbol on /out/.

Derived classes can override this to add own information.

Reimplemented from Symbol.

Definition at line 68 of file variable.cc.

References Symbol::dump(), Type::get_human_readable_type(), get_storage_specifier_name(), has_address(), Symbol_table::has_dump_flag(), initializer, print_annotated_tree(), storage_class, and type.

Ptree* Variable_symbol::get_bitsize   const [inline]
 

Definition at line 34 of file variable.h.

Class_symbol * Variable_symbol::get_class   const [inline]
 

Definition at line 62 of file variable.h.

References in_class.

Referenced by Expr_annotator::process_member_access(), Expr_annotator::visit_name(), and Expr_annotator::visit_unary().

Ptree* Variable_symbol::get_initializer   const [inline]
 

Definition at line 33 of file variable.h.

Symbol::Kind Variable_symbol::get_kind   const [virtual]
 

Implements Symbol.

Definition at line 38 of file variable.cc.

References Symbol::k_Variable.

Storage_class_specifier Variable_symbol::get_storage_class   const [inline]
 

Definition at line 31 of file variable.h.

References storage_class, and Storage_class_specifier.

Referenced by Namespace_scope::add_variable(), is_static(), Expr_annotator::process_member_access(), and Expr_annotator::visit_name().

Type Variable_symbol::get_type   const [inline]
 

Definition at line 30 of file variable.h.

Referenced by Function_signature::add_parameter(), Namespace_scope::add_variable(), make_declaration(), make_name(), Init_handler::process_class(), process_initializers(), Expr_annotator::process_member_access(), Expr_annotator::visit_name(), and Expr_annotator::visit_unary().

bool Variable_symbol::has_address   const [inline]
 

Definition at line 32 of file variable.h.

References has_addr.

Referenced by dump(), is_static(), and Expr_annotator::visit_name().

bool Variable_symbol::is_member_variable   const [inline]
 

Definition at line 35 of file variable.h.

References s_Member, s_Mutable, and storage_class.

Referenced by Namespace_scope::add_variable(), Init_handler::process_class(), Expr_annotator::process_member_access(), set_class(), Expr_annotator::visit_name(), and Expr_annotator::visit_unary().

void Variable_symbol::set_class Class_symbol   csym
 

Definition at line 46 of file variable.cc.

References in_class, and is_member_variable().

Referenced by Class_scope::add_variable().


Member Data Documentation

Ptree* Variable_symbol::bitsize [private]
 

Definition at line 26 of file variable.h.

bool Variable_symbol::has_addr [private]
 

Definition at line 27 of file variable.h.

Referenced by has_address().

Class_symbol* Variable_symbol::in_class [private]
 

Definition at line 28 of file variable.h.

Referenced by get_class(), and set_class().

Ptree* Variable_symbol::initializer [private]
 

Definition at line 25 of file variable.h.

Referenced by dump().

Storage_class_specifier Variable_symbol::storage_class [private]
 

Definition at line 24 of file variable.h.

Referenced by define_variable(), dump(), get_storage_class(), and is_member_variable().

Type Variable_symbol::type [private]
 

Definition at line 23 of file variable.h.

Referenced by dump().


The documentation for this class was generated from the following files:
Generated on Mon Feb 10 17:36:52 2003 for VFiasco Semantics Compiler by doxygen1.2.15