Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

more::lang::cx_block Class Reference

The representation of a C block containing declarations and statements. More...

#include <more/lang/cx_expr.h>

Inheritance diagram for more::lang::cx_block:

Inheritance graph
[legend]
Collaboration diagram for more::lang::cx_block:

Collaboration graph
[legend]
List of all members.

Public Methods


Detailed Description

The representation of a C block containing declarations and statements.


Constructor & Destructor Documentation

more::lang::cx_block::cx_block   [inline]
 


Member Function Documentation

virtual void more::lang::cx_block::append_ctors_to cx_block *    blk [virtual]
 

Append constructors of this expression to blk.

Reimplemented from more::lang::cx_expr.

Reimplemented in more::lang::cx_switch.

void more::lang::cx_block::append_decls_from cx_block const *    blk
 

Append declarations of blk to this block.

cx_identifier* more::lang::cx_block::append_definition cx_expr   e
 

Bind e to a variable in this block, and return the variable.

The initialization of the variable will be pushed onto the end of statement container.

virtual void more::lang::cx_block::append_dtors_to cx_block *    blk [virtual]
 

Append destructors of this expression to blk.

Implementations of this function shall not declare variables in blk.

Reimplemented from more::lang::cx_expr.

Reimplemented in more::lang::cx_switch.

void more::lang::cx_block::append_stmt cx_expr   e
 

Push a statement onto the end of the statement container.

void more::lang::cx_block::append_stmts_from cx_block const *    blk
 

Append statements of blk to this block.

cx_identifier* more::lang::cx_block::declare ct_type const *    rtt
 

Declare a variable of type rtt, and return it.

bool more::lang::cx_block::empty   const [inline]
 

True if no code is inserted into the block.

void more::lang::cx_block::prepend_stmt cx_expr   e
 

Push a statement onto the front of the statement container.

e shall not have constructors or destructors, use an cx_block in such cases.

virtual void more::lang::cx_block::print_as_expr std::ostream &    os const [virtual]
 

Print the C source code of this expression.

The default implementation thows a logic error. This function may be overloaded to extend the backend, otherwise it may be easier to transform the source code.

Reimplemented from more::lang::cx_expr.

virtual void more::lang::cx_block::print_as_stmt std::ostream &    os const [virtual]
 

Print this expression as a C statement.

The default implementation calls print_source and then appends a semicolon.

Reimplemented from more::lang::cx_expr.

Reimplemented in more::lang::cx_switch.

void more::lang::cx_block::print_as_stmt_seq std::ostream &    os const
 


The documentation for this class was generated from the following file:
Generated on Sat Sep 7 19:12:50 2002 for more with Doxygen 1.2.13.1. Doxygen 1.2.13.1 is written and copyright 1997-2002 by Dimitri van Heesch.