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

Init_reader Class Reference

A source of initializers. More...

#include <init_handler_i.h>

Collaboration diagram for Init_reader:

Collaboration graph
[legend]
List of all members.

Public Methods

 Init_reader (Ptree *tree)
 A reader reading /tree/. More...

bool is_compound ()
 true iff next get() will return a compound. More...

Ptreeget ()
 Get next initializer. More...

Ptreeget_nondestructive () const
 Like get(), but doesn't remove the element from the list. More...

bool empty ()
 False iff we still have more initializers. More...

void dump (std::ostream &os)

Private Attributes

Ptreetree

Detailed Description

A source of initializers.

An Init_reader contains the contents of an initializer brace, and provides it one-at-a-time.

Definition at line 23 of file init_handler_i.h.


Constructor & Destructor Documentation

Init_reader::Init_reader Ptree   tree
 

A reader reading /tree/.

The tree is a list of initializers. It may be null to make an Init_reader which behaves as if it didn't contain anything (i.e. "{ }").

Definition at line 24 of file init_handler.cc.


Member Function Documentation

void Init_reader::dump std::ostream &    os
 

Definition at line 64 of file init_handler.cc.

References Ptree::Display2(), and tree.

bool Init_reader::empty   [inline]
 

False iff we still have more initializers.

Definition at line 71 of file init_handler_i.h.

References tree.

Referenced by Init_handler::process_array().

Ptree * Init_reader::get  
 

Get next initializer.

Null if none.

Definition at line 41 of file init_handler.cc.

References Ptree::Car(), Ptree::Cdr(), and tree.

Referenced by Init_handler::process_brace(), and Init_handler::process_class().

Ptree * Init_reader::get_nondestructive   const
 

Like get(), but doesn't remove the element from the list.

Definition at line 56 of file init_handler.cc.

References Ptree::Car(), and tree.

Referenced by Init_handler::process_array(), Init_handler::process_brace(), and Init_handler::process_class().

bool Init_reader::is_compound  
 

true iff next get() will return a compound.

Definition at line 32 of file init_handler.cc.

References Ptree::Car(), and tree.

Referenced by Init_handler::process_brace(), and Init_handler::process_class().


Member Data Documentation

Ptree* Init_reader::tree [private]
 

Definition at line 24 of file init_handler_i.h.

Referenced by dump(), empty(), get(), get_nondestructive(), and is_compound().


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