lestes::lang::cplus::sem::ss_array Class Reference

Class for array type. More...

#include <ss_type.g.hh>

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

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

t_size bound_get () const
 The method bound_get returns the value of the field ss_array::bound.
void bound_set (t_size)
 The method bound_set sets the field ss_array::bound to the given value.
ptr< ss_typetype_get () const
 The method type_get returns the value of the field ss_array::type.
void type_set (const ptr< ss_type > &)
 The method type_set sets the field ss_array::type to the given value.
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 (t_size size, ptr< ss_type > type)
 get the instance representing array of the argument type
static ptr< ss_arraycreate (t_size a__ss_array__bound, ptr< ss_type > a__ss_array__type)
 First generated factory method for class ss_array.

Protected Member Functions

 ss_array (t_size a__ss_array__bound, ptr< ss_type > a__ss_array__type)
 Generated constructor for class ss_array.
virtual void gc_mark ()
 Marking routine for class ss_array.

Private Attributes

t_size bound
srp< ss_typetype

Static Private Attributes

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

Detailed Description

Class for array type.

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


Constructor & Destructor Documentation

lestes::lang::cplus::sem::ss_array::ss_array ( t_size  a__ss_array__bound,
ptr< ss_type a__ss_array__type 
) [protected]

Generated constructor for class ss_array.

Generated constructor for class ss_array.

Author:
lsg

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

Referenced by create().

00855         : ss_type(), bound(a__ss_array__bound), type(checked(a__ss_array__type))
00856 {}


Member Function Documentation

t_size lestes::lang::cplus::sem::ss_array::bound_get (  )  const

The method bound_get returns the value of the field ss_array::bound.

Returns:
The value of ss_array::bound.
Author:
lsg

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

References bound.

00787 {
00788         return bound;
00789 }

void lestes::lang::cplus::sem::ss_array::bound_set ( t_size  x  ) 

The method bound_set sets the field ss_array::bound to the given value.

Parameters:
[in] x The new value to set ss_array::bound to.
Author:
lsg

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

References bound.

00796 {
00797         ss_array::bound = x;
00798 }

ptr< ss_type > lestes::lang::cplus::sem::ss_array::type_get ( void   )  const

The method type_get returns the value of the field ss_array::type.

Returns:
The value of ss_array::type.
Author:
lsg

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

References type.

00805 {
00806         return type;
00807 }

void lestes::lang::cplus::sem::ss_array::type_set ( const ptr< ss_type > &  x  ) 

The method type_set sets the field ss_array::type to the given value.

Parameters:
[in] x The new value to set ss_array::type to.
Author:
lsg

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

References type.

00814 {
00815         ss_array::type = x;
00816 }

ptr< ss_type > lestes::lang::cplus::sem::ss_array::instance ( t_size  size,
ptr< ss_type type 
) [static]

get the instance representing array of the argument type

Returns type representing array of a given type.

Precondition:
type != NULL
Parameters:
size The size of the array.
type The base type for the array.
Returns:
The array of the given type.

Definition at line 325 of file ss_type.cc.

References lestes::intercode::intercode::create(), lassert, and the_instances.

00326 {
00327         the_instances->dump_barrier_set(true); // XXX: needed just once :-I
00328 
00329         lassert(type);
00330 
00331         ptr < pair < t_size, srp < ss_type > > > twin = pair < t_size, srp < ss_type > >::create(size,type);
00332         srp < ss_type > & result = (*the_instances)[twin];
00333         
00334         if (result)
00335                 return result;
00336         
00337         return result = ss_array::create(size, type);
00338 }

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

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

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

00819 {
00820         return v->visit_ss_array( this );
00821 }

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

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

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

00824 {
00825         return v->visit_ss_array( this );
00826 }

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

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

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

00829 {
00830         return v->visit_ss_array( this );
00831 }

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

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

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

00834 {
00835         return v->visit_ss_array( this );
00836 }

ptr< ss_array > lestes::lang::cplus::sem::ss_array::create ( t_size  a__ss_array__bound,
ptr< ss_type a__ss_array__type 
) [static]

First generated factory method for class ss_array.

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

Author:
lsg

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

References ss_array().

00844 {
00845         return ptr< ss_array > ( new ss_array(a__ss_array__bound,
00846                 a__ss_array__type) );
00847 }

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

for purposes of dumping

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

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

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

00859 {
00860         if (!reflection) {
00861                 typedef class_reflection::field_metadata md;
00862                 typedef class_reflection::field_metadata_list mdlist;
00863                 ptr<mdlist> mdl = mdlist::create();
00864                 mdl->push_back( md::create( "bound", "t_size" ) );
00865                 mdl->push_back( md::create( "type", "ss_type" ) );
00866                 mdl->push_back( md::create( "the_instances", "map&lt; srp &lt; ::lestes::std::pair &lt; t_size, srp &lt; ss_type &gt; &gt; &gt;, srp&lt; ss_type &gt;, ::lestes::std::pair_comparator &lt; srp &lt; ::lestes::std::pair &lt; t_size, srp &lt; ss_type &gt; &gt; &gt; &gt; &gt;" ) );
00867                 reflection = reflection_list::create( ss_type::reflection_get() );
00868                 reflection->push_back( class_reflection::create( "ss_array", mdl ) );
00869         }
00870         return reflection;
00871 }

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

for purposes of dumping

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

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

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

00874 {
00875         ptr < field_list_list > result = ss_type::field_values_get();
00876         result->push_back( value_list::create() );
00877         result->back()->push_back( objectize< t_size > ::create( this->bound ) );
00878         result->push_back( value_list::create() );
00879         result->back()->push_back( this->type );
00880         result->push_back( value_list::create() );
00881         result->back()->push_back( this->the_instances );
00882         return result;
00883 }

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

Marking routine for class ss_array.

Marking routine is used for garbage collection.

Author:
lsg

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

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

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

00891 {
00892         ss_type::gc_mark();
00893 }


Member Data Documentation

t_size lestes::lang::cplus::sem::ss_array::bound [private]

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

Referenced by bound_get(), and bound_set().

srp< ss_type > lestes::lang::cplus::sem::ss_array::type [private]

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

Referenced by type_get(), and type_set().

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

holder for the class instances

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

Referenced by instance().

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

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

Definition at line 631 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:31 2007 for lestes by doxygen 1.5.1-20070107