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

more::lang::cx_pattern Class Reference

The representation of a named function call or arbitrary C expression. More...

#include <more/lang/cx_expr.h>

Inheritance diagram for more::lang::cx_pattern:

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

Collaboration graph
[legend]
List of all members.

Public Methods


Detailed Description

The representation of a named function call or arbitrary C expression.

Don't use this for logic and and logic or, as this will produce code that runs constructor and destructors regardless of the result of the LHS.


Constructor & Destructor Documentation

more::lang::cx_pattern::cx_pattern char const *    pattern,
ct_type const *    result_type,
va_list    va
 

Construct an expression of the form pattern which evaluates to result_type and with arguments from va.

Occurances of "%!" in pattern are substituted with argument expressions. If pattern is not a string literal, you must make sure it outlives this object, e.g. by copying it to a GC allocated segment.

By convention the whole expression in pattern is surrounded by parentheses, rather than each sub-expression. That is, it is assumed that all code that is printed is printed such that it has top-level precedence.


Member Function Documentation

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

Append constructors of this expression to blk.

Reimplemented from more::lang::cx_expr.

virtual void more::lang::cx_pattern::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.

virtual void more::lang::cx_pattern::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.


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