lestes::lang::cplus::sem::ss_breakable_stmt Class Reference

Base class for breakable statements. More...

#include <ss_statement.g.hh>

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

lestes::lang::cplus::sem::ss_statement lestes::intercode::ss_base_with_location lestes::intercode::ss_base lestes::intercode::intercode lestes::std::object lestes::std::mem::keystone lestes::lang::cplus::sem::ss_iteration_stmt lestes::lang::cplus::sem::ss_switch_stmt lestes::lang::cplus::sem::ss_do lestes::lang::cplus::sem::ss_for lestes::lang::cplus::sem::ss_while List of all members.

Public Member Functions

ptr< ss_compound_stmtbody_get () const
 The method body_get returns the value of the field ss_breakable_stmt::body.
void body_set (const ptr< ss_compound_stmt > &)
 The method body_set sets the field ss_breakable_stmt::body to the given value.
ptr< ss_expressioncondition_get () const
 The method condition_get returns the value of the field ss_breakable_stmt::condition.
void condition_set (const ptr< ss_expression > &)
 The method condition_set sets the field ss_breakable_stmt::condition to the given value.
virtual void accept_ss_statement_visitor (ptr< ss_statement_visitor > v) override
virtual ptr< reflection_listreflection_get () const
 for purposes of dumping
virtual ptr< field_list_listfield_values_get () const
 for purposes of dumping

Protected Member Functions

 ss_breakable_stmt (ptr< ::lestes::std::source_location > a__ss_base_with_location__location, ptr< ::lestes::std::list< srp< ss_label > > > a__ss_statement__labels, ptr< ss_compound_stmt > a__ss_statement__parent, ptr< ss_sp > a__ss_statement__psp, ptr< ss_sp > a__ss_statement__nsp, ptr< ::lestes::std::list< srp< ss_sp > > > a__ss_statement__sequence_points, ptr< ss_compound_stmt > a__ss_breakable_stmt__body, ptr< ss_expression > a__ss_breakable_stmt__condition)
 Generated constructor for class ss_breakable_stmt.
virtual void gc_mark ()
 Marking routine for class ss_breakable_stmt.

Private Attributes

srp< ss_compound_stmtbody
srp< ss_expressioncondition

Static Private Attributes

static ptr< reflection_listreflection = reflection

Detailed Description

Base class for breakable statements.

Definition at line 742 of file ss_statement.g.hh.


Constructor & Destructor Documentation

lestes::lang::cplus::sem::ss_breakable_stmt::ss_breakable_stmt ( ptr< ::lestes::std::source_location a__ss_base_with_location__location,
ptr< ::lestes::std::list< srp< ss_label > > >  a__ss_statement__labels,
ptr< ss_compound_stmt a__ss_statement__parent,
ptr< ss_sp a__ss_statement__psp,
ptr< ss_sp a__ss_statement__nsp,
ptr< ::lestes::std::list< srp< ss_sp > > >  a__ss_statement__sequence_points,
ptr< ss_compound_stmt a__ss_breakable_stmt__body,
ptr< ss_expression a__ss_breakable_stmt__condition 
) [protected]

Generated constructor for class ss_breakable_stmt.

Generated constructor for class ss_breakable_stmt.

Author:
lsg

Definition at line 1394 of file ss_statement.g.cc.

01402         : ss_statement(a__ss_base_with_location__location,
01403                 a__ss_statement__labels,
01404                 a__ss_statement__parent,
01405                 a__ss_statement__psp,
01406                 a__ss_statement__nsp,
01407                 a__ss_statement__sequence_points), body(checked(a__ss_breakable_stmt__body)), condition(checked(a__ss_breakable_stmt__condition))
01408 {}


Member Function Documentation

ptr< ss_compound_stmt > lestes::lang::cplus::sem::ss_breakable_stmt::body_get (  )  const

The method body_get returns the value of the field ss_breakable_stmt::body.

Returns:
The value of ss_breakable_stmt::body.
Author:
lsg

Definition at line 1358 of file ss_statement.g.cc.

References body.

01359 {
01360         return body;
01361 }

void lestes::lang::cplus::sem::ss_breakable_stmt::body_set ( const ptr< ss_compound_stmt > &  x  ) 

The method body_set sets the field ss_breakable_stmt::body to the given value.

Parameters:
[in] x The new value to set ss_breakable_stmt::body to.
Author:
lsg

Definition at line 1367 of file ss_statement.g.cc.

References body.

01368 {
01369         ss_breakable_stmt::body = x;
01370 }

ptr< ss_expression > lestes::lang::cplus::sem::ss_breakable_stmt::condition_get (  )  const

The method condition_get returns the value of the field ss_breakable_stmt::condition.

Returns:
The value of ss_breakable_stmt::condition.
Author:
lsg

Definition at line 1376 of file ss_statement.g.cc.

References condition.

01377 {
01378         return condition;
01379 }

void lestes::lang::cplus::sem::ss_breakable_stmt::condition_set ( const ptr< ss_expression > &  x  ) 

The method condition_set sets the field ss_breakable_stmt::condition to the given value.

Parameters:
[in] x The new value to set ss_breakable_stmt::condition to.
Author:
lsg

Definition at line 1385 of file ss_statement.g.cc.

References condition.

01386 {
01387         ss_breakable_stmt::condition = x;
01388 }

virtual void lestes::lang::cplus::sem::ss_breakable_stmt::accept_ss_statement_visitor ( ptr< ss_statement_visitor v  )  [pure virtual]

Implements lestes::lang::cplus::sem::ss_statement.

Implemented in lestes::lang::cplus::sem::ss_switch_stmt, lestes::lang::cplus::sem::ss_iteration_stmt, lestes::lang::cplus::sem::ss_do, lestes::lang::cplus::sem::ss_while, and lestes::lang::cplus::sem::ss_for.

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

for purposes of dumping

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

Reimplemented in lestes::lang::cplus::sem::ss_switch_stmt, lestes::lang::cplus::sem::ss_iteration_stmt, lestes::lang::cplus::sem::ss_do, lestes::lang::cplus::sem::ss_while, and lestes::lang::cplus::sem::ss_for.

Definition at line 1410 of file ss_statement.g.cc.

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

Referenced by lestes::lang::cplus::sem::ss_iteration_stmt::reflection_get(), and lestes::lang::cplus::sem::ss_switch_stmt::reflection_get().

01411 {
01412         if (!reflection) {
01413                 typedef class_reflection::field_metadata md;
01414                 typedef class_reflection::field_metadata_list mdlist;
01415                 ptr<mdlist> mdl = mdlist::create();
01416                 mdl->push_back( md::create( "body", "ss_compound_stmt" ) );
01417                 mdl->push_back( md::create( "condition", "ss_expression" ) );
01418                 reflection = reflection_list::create( ss_statement::reflection_get() );
01419                 reflection->push_back( class_reflection::create( "ss_breakable_stmt", mdl ) );
01420         }
01421         return reflection;
01422 }

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

for purposes of dumping

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

Reimplemented in lestes::lang::cplus::sem::ss_switch_stmt, lestes::lang::cplus::sem::ss_iteration_stmt, lestes::lang::cplus::sem::ss_do, lestes::lang::cplus::sem::ss_while, and lestes::lang::cplus::sem::ss_for.

Definition at line 1424 of file ss_statement.g.cc.

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

Referenced by lestes::lang::cplus::sem::ss_iteration_stmt::field_values_get(), and lestes::lang::cplus::sem::ss_switch_stmt::field_values_get().

01425 {
01426         ptr < field_list_list > result = ss_statement::field_values_get();
01427         result->push_back( value_list::create() );
01428         result->back()->push_back( this->body );
01429         result->push_back( value_list::create() );
01430         result->back()->push_back( this->condition );
01431         return result;
01432 }

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

Marking routine for class ss_breakable_stmt.

Marking routine is used for garbage collection.

Author:
lsg

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

Reimplemented in lestes::lang::cplus::sem::ss_switch_stmt, lestes::lang::cplus::sem::ss_iteration_stmt, lestes::lang::cplus::sem::ss_do, lestes::lang::cplus::sem::ss_while, and lestes::lang::cplus::sem::ss_for.

Definition at line 1439 of file ss_statement.g.cc.

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

Referenced by lestes::lang::cplus::sem::ss_iteration_stmt::gc_mark(), and lestes::lang::cplus::sem::ss_switch_stmt::gc_mark().

01440 {
01441         ss_statement::gc_mark();
01442 }


Member Data Documentation

srp< ss_compound_stmt > lestes::lang::cplus::sem::ss_breakable_stmt::body [private]

Reference to additional scope wrapping just the do, for, while, and switch. This scope is used to enforce visibility of any variable declared inside the condition of the breakable.

Definition at line 787 of file ss_statement.g.hh.

Referenced by body_get(), and body_set().

srp< ss_expression > lestes::lang::cplus::sem::ss_breakable_stmt::condition [private]

This is of type expression, because the possible declaration is already accounted for in ss_breakable_stmt::body.

Definition at line 794 of file ss_statement.g.hh.

Referenced by condition_get(), and condition_set().

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

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

Reimplemented in lestes::lang::cplus::sem::ss_switch_stmt, lestes::lang::cplus::sem::ss_iteration_stmt, lestes::lang::cplus::sem::ss_do, lestes::lang::cplus::sem::ss_while, and lestes::lang::cplus::sem::ss_for.

Definition at line 795 of file ss_statement.g.hh.

Referenced by reflection_get().


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