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

more::lang::cx_expr Class Reference

The base class for expressions which can be directly coded into C source and possibly evaluated runtime. More...

#include <more/lang/cx_expr.h>

Inheritance diagram for more::lang::cx_expr:

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

Collaboration graph
[legend]
List of all members.

Public Methods

Protected Methods


Detailed Description

The base class for expressions which can be directly coded into C source and possibly evaluated runtime.

Client code does not need to use this a the base class for expression (e.g. if virtual functions are undesirable). Instead the client expressions may be transformed into C cx_expr instances.


Constructor & Destructor Documentation

virtual more::lang::cx_expr::~cx_expr   [virtual]
 

more::lang::cx_expr::cx_expr ct_type const *    t [inline, explicit, protected]
 


Member Function Documentation

virtual void more::lang::cx_expr::append_ctors_to cx_block   blk [pure virtual]
 

Append constructors of this expression to blk.

Reimplemented in more::lang::cx_block, more::lang::cx_expr_with_ctor_dtor, more::lang::cx_literal, more::lang::cx_call, more::lang::cx_switch, more::lang::cx_lambda, more::lang::cx_cond, more::lang::cx_pattern, more::lang::cx_and, more::lang::cx_locator, and more::lang::cx_package_variable.

virtual void more::lang::cx_expr::append_dtors_to cx_block   blk [pure virtual]
 

Append destructors of this expression to blk.

Implementations of this function shall not declare variables in blk.

Reimplemented in more::lang::cx_block, more::lang::cx_expr_with_ctor_dtor, more::lang::cx_literal, more::lang::cx_call, more::lang::cx_switch, more::lang::cx_lambda, more::lang::cx_cond, more::lang::cx_pattern, more::lang::cx_and, more::lang::cx_locator, and more::lang::cx_package_variable.

virtual void more::lang::cx_expr::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 in more::lang::rt_closure, more::lang::cx_block, more::lang::cx_identifier, more::lang::cx_literal, more::lang::cx_call, more::lang::cx_lambda, more::lang::cx_cond, more::lang::cx_pattern, and more::lang::cx_and.

virtual void more::lang::cx_expr::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 in more::lang::cx_block, more::lang::cx_switch, and more::lang::cx_cond.

void more::lang::cx_expr::set_type ct_type const *    rtt [inline]
 

Change the type of the expression.

ct_type const* more::lang::cx_expr::type_of   const [inline]
 

Return the type of the expression.

Reimplemented in more::lang::cx_lambda.


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.