lestes::lang::cplus::sem::ss_expr2destination Class Reference

Visitor for determination destination of sideeffect expression. Used for origin computation. More...

#include <ss_ss2pi_base.g.hh>

Inheritance diagram for lestes::lang::cplus::sem::ss_expr2destination:

lestes::lang::cplus::sem::ss_expr2destination_base lestes::lang::cplus::sem::ss_expression_visitor lestes::std::visitor_base lestes::std::object lestes::std::mem::keystone List of all members.

Public Member Functions

ptr< ss_expressiondestination_get () const
 The method destination_get returns the value of the field ss_expr2destination::destination.
void destination_set (const ptr< ss_expression > &)
 The method destination_set sets the field ss_expr2destination::destination to the given value.
virtual void default_destination (ptr< ::lestes::lang::cplus::sem::ss_expression >)
virtual void visit_ss_funcall (ptr< ::lestes::lang::cplus::sem::ss_funcall >)
virtual void visit_ss_assign (ptr< ::lestes::lang::cplus::sem::ss_assign >)
virtual void visit_ss_vol_get (ptr< ::lestes::lang::cplus::sem::ss_vol_get >)
ptr< ss_expressionget_destination (const ptr< ::lestes::lang::cplus::sem::ss_expression > &)
 "visit-return" method
virtual ptr< reflection_listreflection_get () const
 for purposes of dumping
virtual ptr< field_list_listfield_values_get () const
 for purposes of dumping

Static Public Member Functions

static ptr< ss_expr2destinationcreate (ptr< ss_expression > a__ss_expr2destination__destination)
 First generated factory method for class ss_expr2destination.
static ptr< ss_expr2destinationcreate ()
 Second generated factory method for class ss_expr2destination.

Protected Member Functions

 ss_expr2destination (ptr< ss_expression > a__ss_expr2destination__destination)
 Generated constructor for class ss_expr2destination.
virtual void gc_mark ()
 Marking routine for class ss_expr2destination.

Private Attributes

srp< ss_expressiondestination
 Field for storing result.

Static Private Attributes

static ptr< reflection_listreflection = reflection

Detailed Description

Visitor for determination destination of sideeffect expression. Used for origin computation.

Definition at line 381 of file ss_ss2pi_base.g.hh.


Constructor & Destructor Documentation

lestes::lang::cplus::sem::ss_expr2destination::ss_expr2destination ( ptr< ss_expression a__ss_expr2destination__destination  )  [protected]

Generated constructor for class ss_expr2destination.

Generated constructor for class ss_expr2destination.

Author:
lsg

Definition at line 473 of file ss_ss2pi_base.g.cc.

Referenced by create().

00474         : ss_expr2destination_base(), destination(a__ss_expr2destination__destination)
00475 {}


Member Function Documentation

ptr< ss_expression > lestes::lang::cplus::sem::ss_expr2destination::destination_get (  )  const

The method destination_get returns the value of the field ss_expr2destination::destination.

Returns:
The value of ss_expr2destination::destination.
Author:
lsg

Definition at line 437 of file ss_ss2pi_base.g.cc.

References destination.

Referenced by get_destination().

00438 {
00439         return destination;
00440 }

void lestes::lang::cplus::sem::ss_expr2destination::destination_set ( const ptr< ss_expression > &  x  ) 

The method destination_set sets the field ss_expr2destination::destination to the given value.

Parameters:
[in] x The new value to set ss_expr2destination::destination to.
Author:
lsg

Definition at line 446 of file ss_ss2pi_base.g.cc.

References destination.

00447 {
00448         ss_expr2destination::destination = x;
00449 }

void lestes::lang::cplus::sem::ss_expr2destination::default_destination ( ptr< ::lestes::lang::cplus::sem::ss_expression  )  [virtual]

We should not ask for another expressions.

Implements lestes::lang::cplus::sem::ss_expr2destination_base.

Definition at line 1204 of file ss_ss2pi_base.cc.

References lassert2.

01204                                                                                     {
01205         lassert2(false,"Trying to get destination from non-side-effect expression.");
01206 }

void lestes::lang::cplus::sem::ss_expr2destination::visit_ss_funcall ( ptr< ::lestes::lang::cplus::sem::ss_funcall  )  [virtual]

There is no destination for funcall.

Reimplemented from lestes::lang::cplus::sem::ss_expr2destination_base.

Definition at line 1211 of file ss_ss2pi_base.cc.

References destination.

01211                                                                               {
01212         destination=NULL;       
01213 }

void lestes::lang::cplus::sem::ss_expr2destination::visit_ss_assign ( ptr< ::lestes::lang::cplus::sem::ss_assign x  )  [virtual]

Destination for assignment is left operand.

Reimplemented from lestes::lang::cplus::sem::ss_expr2destination_base.

Definition at line 1218 of file ss_ss2pi_base.cc.

References destination.

01218                                                                              {
01219         destination=x->left_get();
01220 }

void lestes::lang::cplus::sem::ss_expr2destination::visit_ss_vol_get ( ptr< ::lestes::lang::cplus::sem::ss_vol_get x  )  [virtual]

Destination for volatile access is accessed variable itself.

Reimplemented from lestes::lang::cplus::sem::ss_expr2destination_base.

Definition at line 1225 of file ss_ss2pi_base.cc.

References destination.

01225                                                                                {
01226         destination=x->expr_get();
01227 }

ptr< ss_expr2destination > lestes::lang::cplus::sem::ss_expr2destination::create ( ptr< ss_expression a__ss_expr2destination__destination  )  [static]

First generated factory method for class ss_expr2destination.

This factory method for class ss_expr2destination takes values of all fields as arguments.

Author:
lsg

Definition at line 455 of file ss_ss2pi_base.g.cc.

References ss_expr2destination().

00456 {
00457         return ptr< ss_expr2destination > ( new ss_expr2destination(a__ss_expr2destination__destination) );
00458 }

ptr< ss_expr2destination > lestes::lang::cplus::sem::ss_expr2destination::create ( void   )  [static]

Second generated factory method for class ss_expr2destination.

This factory method for class ss_expr2destination uses initializers.

Author:
lsg

Definition at line 464 of file ss_ss2pi_base.g.cc.

References ss_expr2destination().

00465 {
00466         return ptr< ss_expr2destination > ( new ss_expr2destination(NULL) );
00467 }

ptr< ss_expression > lestes::lang::cplus::sem::ss_expr2destination::get_destination ( const ptr< ::lestes::lang::cplus::sem::ss_expression > &   ) 

"visit-return" method

Definition at line 498 of file ss_ss2pi_base.g.cc.

References destination_get(), and lassert2.

00499 {
00500         lassert2( o, "Cannot visit NULL object." );
00501         o->accept_ss_expression_visitor( ptr< ss_expression_visitor >(this) );
00502         return destination_get();
00503 }

ptr< object::reflection_list > lestes::lang::cplus::sem::ss_expr2destination::reflection_get (  )  const [virtual]

for purposes of dumping

Reimplemented from lestes::lang::cplus::sem::ss_expr2destination_base.

Definition at line 477 of file ss_ss2pi_base.g.cc.

References lestes::std::list< T >::create(), reflection, and lestes::lang::cplus::sem::ss_expr2destination_base::reflection_get().

00478 {
00479         if (!reflection) {
00480                 typedef class_reflection::field_metadata md;
00481                 typedef class_reflection::field_metadata_list mdlist;
00482                 ptr<mdlist> mdl = mdlist::create();
00483                 mdl->push_back( md::create( "destination", "ss_expression" ) );
00484                 reflection = reflection_list::create( ss_expr2destination_base::reflection_get() );
00485                 reflection->push_back( class_reflection::create( "ss_expr2destination", mdl ) );
00486         }
00487         return reflection;
00488 }

ptr< object::field_list_list > lestes::lang::cplus::sem::ss_expr2destination::field_values_get (  )  const [virtual]

for purposes of dumping

Reimplemented from lestes::lang::cplus::sem::ss_expr2destination_base.

Definition at line 490 of file ss_ss2pi_base.g.cc.

References lestes::std::list< T >::create(), and lestes::lang::cplus::sem::ss_expr2destination_base::field_values_get().

00491 {
00492         ptr < field_list_list > result = ss_expr2destination_base::field_values_get();
00493         result->push_back( value_list::create() );
00494         result->back()->push_back( this->destination );
00495         return result;
00496 }

void lestes::lang::cplus::sem::ss_expr2destination::gc_mark ( void   )  [protected, virtual]

Marking routine for class ss_expr2destination.

Marking routine is used for garbage collection.

Author:
lsg

Reimplemented from lestes::lang::cplus::sem::ss_expr2destination_base.

Definition at line 510 of file ss_ss2pi_base.g.cc.

References lestes::lang::cplus::sem::ss_expr2destination_base::gc_mark().

00511 {
00512         ss_expr2destination_base::gc_mark();
00513 }


Member Data Documentation

srp< ss_expression > lestes::lang::cplus::sem::ss_expr2destination::destination [private]

Field for storing result.

In case of sideeffect expression without destination(funcall) is set to NULL.

Definition at line 432 of file ss_ss2pi_base.g.hh.

Referenced by destination_get(), destination_set(), visit_ss_assign(), visit_ss_funcall(), and visit_ss_vol_get().

ptr< object::reflection_list > lestes::lang::cplus::sem::ss_expr2destination::reflection = reflection [static, private]

Reimplemented from lestes::lang::cplus::sem::ss_expr2destination_base.

Definition at line 433 of file ss_ss2pi_base.g.hh.

Referenced by reflection_get().


The documentation for this class was generated from the following files:
Generated on Mon Feb 12 18:25:26 2007 for lestes by doxygen 1.5.1-20070107