lestes::lang::cplus::sem::ss_volatile Class Reference

Class for volatile types. More...

#include <ss_type.g.hh>

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

lestes::lang::cplus::sem::ss_type lestes::intercode::ss_base lestes::intercode::intercode lestes::std::object lestes::std::mem::keystone List of all members.

Public Member Functions

ptr< ss_typewhat_get () const
 The method what_get returns the value of the field ss_volatile::what.
void what_set (const ptr< ss_type > &)
 The method what_set sets the field ss_volatile::what to the given value.
virtual bool is_void ()
 Is this type void?
virtual bool is_volatile ()
 Is this type volatile?
virtual ptr< ::lestes::std::list<
srp< or_ics_functional > > > 
accept_or_ics_base (ptr< or_ics_base > v)
virtual or_cv_enum accept_or_ics_base_cv (ptr< or_ics_base_cv > v)
virtual ptr< ::lestes::md::types::tm_data_type_baseaccept_ss_type2tm_type_gen_base (ptr< ss_type2tm_type_gen_base > v)
virtual void accept_ss_type_visitor (ptr< ss_type_visitor > v)
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_typeinstance (ptr< ss_type > type)
 get the instance representing appropriately qualified argument type
static ptr< ss_volatilecreate (ptr< ss_type > a__ss_volatile__what)
 First generated factory method for class ss_volatile.

Protected Member Functions

 ss_volatile (ptr< ss_type > a__ss_volatile__what)
 Generated constructor for class ss_volatile.
virtual void gc_mark ()
 Marking routine for class ss_volatile.

Private Attributes

srp< ss_typewhat

Static Private Attributes

static ptr< ::lestes::std::map<
srp< ss_type >, srp< ss_type > > > 
the_instances = ::lestes::std::map< srp< ss_type >, srp< ss_type > > ::create()
 holder for the class instances
static ptr< reflection_listreflection = reflection

Detailed Description

Class for volatile types.

Singleton class.

Definition at line 218 of file ss_type.g.hh.


Constructor & Destructor Documentation

lestes::lang::cplus::sem::ss_volatile::ss_volatile ( ptr< ss_type a__ss_volatile__what  )  [protected]

Generated constructor for class ss_volatile.

Generated constructor for class ss_volatile.

Author:
lsg

Definition at line 262 of file ss_type.g.cc.

Referenced by create().

00263         : ss_type(), what(checked(a__ss_volatile__what))
00264 {}


Member Function Documentation

ptr< ss_type > lestes::lang::cplus::sem::ss_volatile::what_get (  )  const

The method what_get returns the value of the field ss_volatile::what.

Returns:
The value of ss_volatile::what.
Author:
lsg

Definition at line 215 of file ss_type.g.cc.

References what.

00216 {
00217         return what;
00218 }

void lestes::lang::cplus::sem::ss_volatile::what_set ( const ptr< ss_type > &  x  ) 

The method what_set sets the field ss_volatile::what to the given value.

Parameters:
[in] x The new value to set ss_volatile::what to.
Author:
lsg

Definition at line 224 of file ss_type.g.cc.

References what.

00225 {
00226         ss_volatile::what = x;
00227 }

bool lestes::lang::cplus::sem::ss_volatile::is_void (  )  [virtual]

Is this type void?

Used for genarating pi calls. Differentiate between call and callv. Generic case returns false;

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

Definition at line 68 of file ss_type.cc.

References what.

00069 {
00070         return what->is_void();
00071 }

bool lestes::lang::cplus::sem::ss_volatile::is_volatile (  )  [virtual]

Is this type volatile?

Used for generating side effects. Returns true.

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

Definition at line 104 of file ss_type.cc.

00105 {
00106         return true;
00107 }

ptr< ss_type > lestes::lang::cplus::sem::ss_volatile::instance ( ptr< ss_type x  )  [static]

get the instance representing appropriately qualified argument type

Returns volatilized version of a given type. The volatilization is an idempotent operation. Constization and volatilization is commutative.

Precondition:
x != NULL
Parameters:
x The type to make volatile.
Returns:
The volatilized type.

Definition at line 178 of file ss_type.cc.

References lestes::intercode::intercode::create(), lestes::lang::cplus::sem::ss_type2info::create(), lestes::lang::cplus::sem::ss_const::instance(), lassert, lestes::lang::cplus::sem::ss_type2info::SS_CONST, lestes::lang::cplus::sem::ss_type2info::SS_CONST_VOLATILE, lestes::lang::cplus::sem::ss_type2info::SS_VOLATILE, and the_instances.

00179 {
00180         the_instances->dump_barrier_set(true); // XXX: needed just once :-I
00181 
00182         lassert(x);
00183         srp <ss_type> &result = (*the_instances)[x];
00184 
00185         if (result) 
00186                 return result;
00187 
00188         ptr<ss_type2info> ssti = ss_type2info::create();
00189 
00190         switch (ssti->process(x)) {
00191         case ss_type2info::SS_VOLATILE:
00192         case ss_type2info::SS_CONST_VOLATILE:
00193                 return result = x;
00194         case ss_type2info::SS_CONST:
00195                 // create ss_const_volatile only via instance of ss_const
00196                 return result = ss_const::instance(ss_volatile::instance(ssti->ss_const_object_get()->what_get()));
00197         default:
00198                 break;
00199         }
00200 
00201         return result = ss_volatile::create(x);
00202 }

ptr<::lestes::std::list< srp< or_ics_functional > > > lestes::lang::cplus::sem::ss_volatile::accept_or_ics_base ( ptr< or_ics_base v  )  [virtual]

Implements lestes::lang::cplus::sem::ss_type.

Definition at line 229 of file ss_type.g.cc.

00230 {
00231         return v->visit_ss_volatile( this );
00232 }

or_cv_enum lestes::lang::cplus::sem::ss_volatile::accept_or_ics_base_cv ( ptr< or_ics_base_cv v  )  [virtual]

Implements lestes::lang::cplus::sem::ss_type.

Definition at line 234 of file ss_type.g.cc.

00235 {
00236         return v->visit_ss_volatile( this );
00237 }

ptr<::lestes::md::types::tm_data_type_base > lestes::lang::cplus::sem::ss_volatile::accept_ss_type2tm_type_gen_base ( ptr< ss_type2tm_type_gen_base v  )  [virtual]

Implements lestes::lang::cplus::sem::ss_type.

Definition at line 239 of file ss_type.g.cc.

00240 {
00241         return v->visit_ss_volatile( this );
00242 }

void lestes::lang::cplus::sem::ss_volatile::accept_ss_type_visitor ( ptr< ss_type_visitor v  )  [virtual]

Implements lestes::lang::cplus::sem::ss_type.

Definition at line 244 of file ss_type.g.cc.

00245 {
00246         return v->visit_ss_volatile( this );
00247 }

ptr< ss_volatile > lestes::lang::cplus::sem::ss_volatile::create ( ptr< ss_type a__ss_volatile__what  )  [static]

First generated factory method for class ss_volatile.

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

Author:
lsg

Definition at line 253 of file ss_type.g.cc.

References ss_volatile().

00254 {
00255         return ptr< ss_volatile > ( new ss_volatile(a__ss_volatile__what) );
00256 }

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

for purposes of dumping

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

Definition at line 266 of file ss_type.g.cc.

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

00267 {
00268         if (!reflection) {
00269                 typedef class_reflection::field_metadata md;
00270                 typedef class_reflection::field_metadata_list mdlist;
00271                 ptr<mdlist> mdl = mdlist::create();
00272                 mdl->push_back( md::create( "what", "ss_type" ) );
00273                 mdl->push_back( md::create( "the_instances", "map&lt; srp&lt; ss_type &gt;, srp&lt; ss_type &gt; &gt;" ) );
00274                 reflection = reflection_list::create( ss_type::reflection_get() );
00275                 reflection->push_back( class_reflection::create( "ss_volatile", mdl ) );
00276         }
00277         return reflection;
00278 }

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

for purposes of dumping

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

Definition at line 280 of file ss_type.g.cc.

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

00281 {
00282         ptr < field_list_list > result = ss_type::field_values_get();
00283         result->push_back( value_list::create() );
00284         result->back()->push_back( this->what );
00285         result->push_back( value_list::create() );
00286         result->back()->push_back( this->the_instances );
00287         return result;
00288 }

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

Marking routine for class ss_volatile.

Marking routine is used for garbage collection.

Author:
lsg

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

Definition at line 295 of file ss_type.g.cc.

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

00296 {
00297         ss_type::gc_mark();
00298 }


Member Data Documentation

srp< ss_type > lestes::lang::cplus::sem::ss_volatile::what [private]

Definition at line 277 of file ss_type.g.hh.

Referenced by is_void(), what_get(), and what_set().

ptr<::lestes::std::map< srp< ss_type >, srp< ss_type > > > lestes::lang::cplus::sem::ss_volatile::the_instances = ::lestes::std::map< srp< ss_type >, srp< ss_type > > ::create() [static, private]

holder for the class instances

Definition at line 279 of file ss_type.g.hh.

Referenced by instance().

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

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

Definition at line 280 of file ss_type.g.hh.

Referenced by reflection_get().


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