memory_allocators.g.cc

Go to the documentation of this file.
00001 // This file is automatically generated, do not edit.
00002 
00003 #include <lestes/backend_v2/intercode/pi.g.hh>
00004 #include <lestes/backend_v2/intercode/pi_mem_factory.g.hh>
00005 #include <lestes/md/literals/literal_info_base.g.hh>
00006 #include <lestes/md/types/tm_data_type_base.g.hh>
00007 #include <lestes/lang/cplus/sem/ss_declaration.g.hh>
00008 
00009 #include <lestes/std/list.hh>
00010 #include <lestes/std/pair.hh>
00011 #include <lestes/std/reflect.hh>
00012 
00013 #include <lestes/md/mem/memory_allocators.g.hh>
00014 
00015 package(lestes);
00016 package(md);
00017 package(mem);
00018 
00019 
00020 // ------------- Class local_variable_allocator follows. -------------
00021 
00022 /*!
00023    \returns The value of local_variable_allocator::placement_calculated.
00024    \author lsg
00025  */
00026 bool local_variable_allocator::placement_calculated_get() const
00027 {
00028         return placement_calculated;
00029 }
00030 
00031 /*!
00032    \param[in] x The new value to set local_variable_allocator::placement_calculated to.
00033    \author lsg
00034  */
00035 void local_variable_allocator::placement_calculated_set(bool x)
00036 {
00037         local_variable_allocator::placement_calculated = x;
00038 }
00039 
00040 /*!
00041    \returns The value of local_variable_allocator::preserved_space_size.
00042    \author lsg
00043  */
00044 t_ssize local_variable_allocator::preserved_space_size_get() const
00045 {
00046         return preserved_space_size;
00047 }
00048 
00049 /*!
00050    \param[in] x The new value to set local_variable_allocator::preserved_space_size to.
00051    \author lsg
00052  */
00053 void local_variable_allocator::preserved_space_size_set(t_ssize x)
00054 {
00055         local_variable_allocator::preserved_space_size = x;
00056 }
00057 
00058 /*!
00059    \returns The value of local_variable_allocator::vars_space_start_offset.
00060    \author lsg
00061  */
00062 t_ssize local_variable_allocator::vars_space_start_offset_get() const
00063 {
00064         return vars_space_start_offset;
00065 }
00066 
00067 /*!
00068    \param[in] x The new value to set local_variable_allocator::vars_space_start_offset to.
00069    \author lsg
00070  */
00071 void local_variable_allocator::vars_space_start_offset_set(t_ssize x)
00072 {
00073         local_variable_allocator::vars_space_start_offset = x;
00074 }
00075 
00076 /*!
00077    \returns The value of local_variable_allocator::tmps_space_start_offset.
00078    \author lsg
00079  */
00080 t_ssize local_variable_allocator::tmps_space_start_offset_get() const
00081 {
00082         return tmps_space_start_offset;
00083 }
00084 
00085 /*!
00086    \param[in] x The new value to set local_variable_allocator::tmps_space_start_offset to.
00087    \author lsg
00088  */
00089 void local_variable_allocator::tmps_space_start_offset_set(t_ssize x)
00090 {
00091         local_variable_allocator::tmps_space_start_offset = x;
00092 }
00093 
00094 /*!
00095    \returns The value of local_variable_allocator::local_end_offset.
00096    \author lsg
00097  */
00098 t_ssize local_variable_allocator::local_end_offset_get() const
00099 {
00100         return local_end_offset;
00101 }
00102 
00103 /*!
00104    \param[in] x The new value to set local_variable_allocator::local_end_offset to.
00105    \author lsg
00106  */
00107 void local_variable_allocator::local_end_offset_set(t_ssize x)
00108 {
00109         local_variable_allocator::local_end_offset = x;
00110 }
00111 
00112 /*!
00113    \returns The value of local_variable_allocator::singleton_instances.
00114    \author lsg
00115  */
00116 ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > > local_variable_allocator::singleton_instances_get()
00117 {
00118         return singleton_instances;
00119 }
00120 
00121 /*!
00122    \param[in] x The new value to set local_variable_allocator::singleton_instances to.
00123    \author lsg
00124  */
00125 void local_variable_allocator::singleton_instances_set(const ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > > & x)
00126 {
00127         local_variable_allocator::singleton_instances = x;
00128 }
00129 
00130 /*!
00131    \returns The value of local_variable_allocator::tmps.
00132    \author lsg
00133  */
00134 ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > local_variable_allocator::tmps_get() const
00135 {
00136         return tmps;
00137 }
00138 
00139 /*!
00140    \param[in] x The new value to set local_variable_allocator::tmps to.
00141    \author lsg
00142  */
00143 void local_variable_allocator::tmps_set(const ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > & x)
00144 {
00145         local_variable_allocator::tmps = x;
00146 }
00147 
00148 /*!
00149    \returns The value of local_variable_allocator::variables.
00150    \author lsg
00151  */
00152 ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > local_variable_allocator::variables_get() const
00153 {
00154         return variables;
00155 }
00156 
00157 /*!
00158    \param[in] x The new value to set local_variable_allocator::variables to.
00159    \author lsg
00160  */
00161 void local_variable_allocator::variables_set(const ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > & x)
00162 {
00163         local_variable_allocator::variables = x;
00164 }
00165 
00166 /*!
00167    This factory method for class local_variable_allocator takes values of all fields as arguments.
00168    \author lsg
00169  */
00170 ptr< local_variable_allocator > local_variable_allocator::create(ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__local_variable_allocator_base__function,
00171                 bool a__local_variable_allocator__placement_calculated,
00172                 t_ssize a__local_variable_allocator__preserved_space_size,
00173                 t_ssize a__local_variable_allocator__vars_space_start_offset,
00174                 t_ssize a__local_variable_allocator__tmps_space_start_offset,
00175                 t_ssize a__local_variable_allocator__local_end_offset,
00176                 ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > a__local_variable_allocator__tmps,
00177                 ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > a__local_variable_allocator__variables)
00178 {
00179         return ptr< local_variable_allocator > ( new local_variable_allocator(a__local_variable_allocator_base__function,
00180                 a__local_variable_allocator__placement_calculated,
00181                 a__local_variable_allocator__preserved_space_size,
00182                 a__local_variable_allocator__vars_space_start_offset,
00183                 a__local_variable_allocator__tmps_space_start_offset,
00184                 a__local_variable_allocator__local_end_offset,
00185                 a__local_variable_allocator__tmps,
00186                 a__local_variable_allocator__variables) );
00187 }
00188 
00189 /*!
00190    This factory method for class local_variable_allocator uses initializers.
00191    \author lsg
00192  */
00193 ptr< local_variable_allocator > local_variable_allocator::create(ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__local_variable_allocator_base__function)
00194 {
00195         return ptr< local_variable_allocator > ( new local_variable_allocator(a__local_variable_allocator_base__function, false, 0, 0, 0, 0, ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > ::create(), ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > ::create()) );
00196 }
00197 
00198 /*!
00199    Generated constructor for class local_variable_allocator.
00200    \author lsg
00201  */
00202 local_variable_allocator::local_variable_allocator (ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__local_variable_allocator_base__function,
00203                 bool a__local_variable_allocator__placement_calculated,
00204                 t_ssize a__local_variable_allocator__preserved_space_size,
00205                 t_ssize a__local_variable_allocator__vars_space_start_offset,
00206                 t_ssize a__local_variable_allocator__tmps_space_start_offset,
00207                 t_ssize a__local_variable_allocator__local_end_offset,
00208                 ptr< ::lestes::std::list< srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > a__local_variable_allocator__tmps,
00209                 ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_stack > > > a__local_variable_allocator__variables)
00210         : local_variable_allocator_base(a__local_variable_allocator_base__function), placement_calculated(a__local_variable_allocator__placement_calculated), preserved_space_size(a__local_variable_allocator__preserved_space_size), vars_space_start_offset(a__local_variable_allocator__vars_space_start_offset), tmps_space_start_offset(a__local_variable_allocator__tmps_space_start_offset), local_end_offset(a__local_variable_allocator__local_end_offset), tmps(checked(a__local_variable_allocator__tmps)), variables(checked(a__local_variable_allocator__variables))
00211 {}
00212 
00213 ptr< object::reflection_list > local_variable_allocator::reflection_get() const
00214 {
00215         if (!reflection) {
00216                 typedef class_reflection::field_metadata md;
00217                 typedef class_reflection::field_metadata_list mdlist;
00218                 ptr<mdlist> mdl = mdlist::create();
00219                 mdl->push_back( md::create( "placement_calculated", "bool" ) );
00220                 mdl->push_back( md::create( "preserved_space_size", "t_ssize" ) );
00221                 mdl->push_back( md::create( "vars_space_start_offset", "t_ssize" ) );
00222                 mdl->push_back( md::create( "tmps_space_start_offset", "t_ssize" ) );
00223                 mdl->push_back( md::create( "local_end_offset", "t_ssize" ) );
00224                 mdl->push_back( md::create( "singleton_instances", "map&lt; srp&lt; ::lestes::lang::cplus::sem::ss_function_declaration &gt;, srp&lt; local_variable_allocator &gt; &gt;" ) );
00225                 mdl->push_back( md::create( "tmps", "list&lt; srp&lt; ::lestes::backend_v2::intercode::pi_mf_stack &gt; &gt;" ) );
00226                 mdl->push_back( md::create( "variables", "map&lt; srp&lt; ::lestes::lang::cplus::sem::ss_object_declaration &gt;, srp&lt; ::lestes::backend_v2::intercode::pi_mf_stack &gt; &gt;" ) );
00227                 reflection = reflection_list::create( local_variable_allocator_base::reflection_get() );
00228                 reflection->push_back( class_reflection::create( "local_variable_allocator", mdl ) );
00229         }
00230         return reflection;
00231 }
00232 
00233 ptr< object::field_list_list > local_variable_allocator::field_values_get() const
00234 {
00235         ptr < field_list_list > result = local_variable_allocator_base::field_values_get();
00236         result->push_back( value_list::create() );
00237         result->back()->push_back( objectize< bool > ::create( this->placement_calculated ) );
00238         result->push_back( value_list::create() );
00239         result->back()->push_back( objectize< t_ssize > ::create( this->preserved_space_size ) );
00240         result->push_back( value_list::create() );
00241         result->back()->push_back( objectize< t_ssize > ::create( this->vars_space_start_offset ) );
00242         result->push_back( value_list::create() );
00243         result->back()->push_back( objectize< t_ssize > ::create( this->tmps_space_start_offset ) );
00244         result->push_back( value_list::create() );
00245         result->back()->push_back( objectize< t_ssize > ::create( this->local_end_offset ) );
00246         result->push_back( value_list::create() );
00247         result->back()->push_back( this->singleton_instances );
00248         result->push_back( value_list::create() );
00249         result->back()->push_back( this->tmps );
00250         result->push_back( value_list::create() );
00251         result->back()->push_back( this->variables );
00252         return result;
00253 }
00254 
00255 
00256 /*!
00257    Marking routine is used for garbage collection.
00258    \author lsg
00259  */
00260 void local_variable_allocator::gc_mark()
00261 {
00262         local_variable_allocator_base::gc_mark();
00263 }
00264 
00265 // End of class local_variable_allocator.
00266 
00267 // ------------- Class global_variable_allocator follows. -------------
00268 
00269 /*!
00270    \returns The value of global_variable_allocator::singleton_instance.
00271    \author lsg
00272  */
00273 ptr< global_variable_allocator > global_variable_allocator::singleton_instance_get()
00274 {
00275         return singleton_instance;
00276 }
00277 
00278 /*!
00279    \param[in] x The new value to set global_variable_allocator::singleton_instance to.
00280    \author lsg
00281  */
00282 void global_variable_allocator::singleton_instance_set(const ptr< global_variable_allocator > & x)
00283 {
00284         global_variable_allocator::singleton_instance = x;
00285 }
00286 
00287 /*!
00288    \returns The value of global_variable_allocator::variables.
00289    \author lsg
00290  */
00291 ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_decl > > > global_variable_allocator::variables_get() const
00292 {
00293         return variables;
00294 }
00295 
00296 /*!
00297    \param[in] x The new value to set global_variable_allocator::variables to.
00298    \author lsg
00299  */
00300 void global_variable_allocator::variables_set(const ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_decl > > > & x)
00301 {
00302         global_variable_allocator::variables = x;
00303 }
00304 
00305 /*!
00306    \returns The value of global_variable_allocator::values.
00307    \author lsg
00308  */
00309 ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::md::literals::literal_info_base > > > global_variable_allocator::values_get() const
00310 {
00311         return values;
00312 }
00313 
00314 /*!
00315    \param[in] x The new value to set global_variable_allocator::values to.
00316    \author lsg
00317  */
00318 void global_variable_allocator::values_set(const ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::md::literals::literal_info_base > > > & x)
00319 {
00320         global_variable_allocator::values = x;
00321 }
00322 
00323 /*!
00324    This factory method for class global_variable_allocator takes values of all fields as arguments.
00325    \author lsg
00326  */
00327 ptr< global_variable_allocator > global_variable_allocator::create(ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_decl > > > a__global_variable_allocator__variables,
00328                 ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::md::literals::literal_info_base > > > a__global_variable_allocator__values)
00329 {
00330         return ptr< global_variable_allocator > ( new global_variable_allocator(a__global_variable_allocator__variables,
00331                 a__global_variable_allocator__values) );
00332 }
00333 
00334 /*!
00335    This factory method for class global_variable_allocator uses initializers.
00336    \author lsg
00337  */
00338 ptr< global_variable_allocator > global_variable_allocator::create()
00339 {
00340         return ptr< global_variable_allocator > ( new global_variable_allocator(::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_decl > > ::create(), ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::md::literals::literal_info_base > > ::create()) );
00341 }
00342 
00343 /*!
00344    Generated constructor for class global_variable_allocator.
00345    \author lsg
00346  */
00347 global_variable_allocator::global_variable_allocator (ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_object_declaration >, srp< ::lestes::backend_v2::intercode::pi_mf_decl > > > a__global_variable_allocator__variables,
00348                 ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::md::literals::literal_info_base > > > a__global_variable_allocator__values)
00349         : global_variable_allocator_base(), variables(checked(a__global_variable_allocator__variables)), values(checked(a__global_variable_allocator__values))
00350 {}
00351 
00352 ptr< object::reflection_list > global_variable_allocator::reflection_get() const
00353 {
00354         if (!reflection) {
00355                 typedef class_reflection::field_metadata md;
00356                 typedef class_reflection::field_metadata_list mdlist;
00357                 ptr<mdlist> mdl = mdlist::create();
00358                 mdl->push_back( md::create( "singleton_instance", "global_variable_allocator" ) );
00359                 mdl->push_back( md::create( "variables", "map&lt; srp&lt; ::lestes::lang::cplus::sem::ss_object_declaration &gt;, srp&lt; ::lestes::backend_v2::intercode::pi_mf_decl &gt; &gt;" ) );
00360                 mdl->push_back( md::create( "values", "map&lt; srp&lt; ::lestes::backend_v2::intercode::pi_mem_factory &gt;, srp&lt; ::lestes::md::literals::literal_info_base &gt; &gt;" ) );
00361                 reflection = reflection_list::create( global_variable_allocator_base::reflection_get() );
00362                 reflection->push_back( class_reflection::create( "global_variable_allocator", mdl ) );
00363         }
00364         return reflection;
00365 }
00366 
00367 ptr< object::field_list_list > global_variable_allocator::field_values_get() const
00368 {
00369         ptr < field_list_list > result = global_variable_allocator_base::field_values_get();
00370         result->push_back( value_list::create() );
00371         result->back()->push_back( this->singleton_instance );
00372         result->push_back( value_list::create() );
00373         result->back()->push_back( this->variables );
00374         result->push_back( value_list::create() );
00375         result->back()->push_back( this->values );
00376         return result;
00377 }
00378 
00379 
00380 /*!
00381    Marking routine is used for garbage collection.
00382    \author lsg
00383  */
00384 void global_variable_allocator::gc_mark()
00385 {
00386         global_variable_allocator_base::gc_mark();
00387 }
00388 
00389 // End of class global_variable_allocator.
00390 
00391 
00392 // static data members follow 
00393 ptr< ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > > local_variable_allocator::singleton_instances = ::lestes::std::map< srp< ::lestes::lang::cplus::sem::ss_function_declaration >, srp< local_variable_allocator > > ::create();
00394 ptr<object::reflection_list> local_variable_allocator::reflection = reflection;
00395 ptr< global_variable_allocator > global_variable_allocator::singleton_instance = singleton_instance;
00396 ptr<object::reflection_list> global_variable_allocator::reflection = reflection;
00397 
00398 end_package(mem);
00399 end_package(md);
00400 end_package(lestes);
00401 

Generated on Mon Feb 12 18:22:41 2007 for lestes by doxygen 1.5.1-20070107