00001 // This file is automatically generated, do not edit. 00002 00003 /*! 00004 \file 00005 \brief Base classes for memory allocators. 00006 \author jaz 00007 */ 00008 00009 #include <lestes/lang/cplus/sem/ss_declaration.g.hh> 00010 #include <lestes/lang/cplus/sem/ss_type.g.hh> 00011 #include <lestes/md/types/tm_data_type_base.g.hh> 00012 #include <lestes/md/literals/literal_info_base.g.hh> 00013 #include <lestes/backend_v2/intercode/pi.g.hh> 00014 #include <lestes/backend_v2/intercode/pi_mem_factory.g.hh> 00015 00016 #include <lestes/std/list.hh> 00017 #include <lestes/std/pair.hh> 00018 #include <lestes/std/reflect.hh> 00019 00020 #include <lestes/md/mem/memory_allocator_bases.g.hh> 00021 00022 package(lestes); 00023 package(md); 00024 package(mem); 00025 00026 00027 // ------------- Class allocator_base follows. ------------- 00028 00029 /*! 00030 Generated constructor for class allocator_base. 00031 \author lsg 00032 */ 00033 allocator_base::allocator_base () 00034 : ::lestes::std::object() 00035 {} 00036 00037 ptr< object::reflection_list > allocator_base::reflection_get() const 00038 { 00039 if (!reflection) { 00040 typedef class_reflection::field_metadata md; 00041 typedef class_reflection::field_metadata_list mdlist; 00042 ptr<mdlist> mdl = mdlist::create(); 00043 reflection = reflection_list::create( ::lestes::std::object::reflection_get() ); 00044 reflection->push_back( class_reflection::create( "allocator_base", mdl ) ); 00045 } 00046 return reflection; 00047 } 00048 00049 ptr< object::field_list_list > allocator_base::field_values_get() const 00050 { 00051 ptr < field_list_list > result = ::lestes::std::object::field_values_get(); 00052 return result; 00053 } 00054 00055 00056 /*! 00057 Marking routine is used for garbage collection. 00058 \author lsg 00059 */ 00060 void allocator_base::gc_mark() 00061 { 00062 ::lestes::std::object::gc_mark(); 00063 } 00064 00065 // End of class allocator_base. 00066 00067 // ------------- Class local_variable_allocator_base follows. ------------- 00068 00069 /*! 00070 \returns The value of local_variable_allocator_base::function. 00071 \author lsg 00072 */ 00073 ptr< ::lestes::lang::cplus::sem::ss_function_declaration > local_variable_allocator_base::function_get() const 00074 { 00075 return function; 00076 } 00077 00078 /*! 00079 \param[in] x The new value to set local_variable_allocator_base::function to. 00080 \author lsg 00081 */ 00082 void local_variable_allocator_base::function_set(const ptr< ::lestes::lang::cplus::sem::ss_function_declaration > & x) 00083 { 00084 local_variable_allocator_base::function = x; 00085 } 00086 00087 /*! 00088 Generated constructor for class local_variable_allocator_base. 00089 \author lsg 00090 */ 00091 local_variable_allocator_base::local_variable_allocator_base (ptr< ::lestes::lang::cplus::sem::ss_function_declaration > a__local_variable_allocator_base__function) 00092 : allocator_base(), function(checked(a__local_variable_allocator_base__function)) 00093 {} 00094 00095 ptr< object::reflection_list > local_variable_allocator_base::reflection_get() const 00096 { 00097 if (!reflection) { 00098 typedef class_reflection::field_metadata md; 00099 typedef class_reflection::field_metadata_list mdlist; 00100 ptr<mdlist> mdl = mdlist::create(); 00101 mdl->push_back( md::create( "function", "ss_function_declaration" ) ); 00102 reflection = reflection_list::create( allocator_base::reflection_get() ); 00103 reflection->push_back( class_reflection::create( "local_variable_allocator_base", mdl ) ); 00104 } 00105 return reflection; 00106 } 00107 00108 ptr< object::field_list_list > local_variable_allocator_base::field_values_get() const 00109 { 00110 ptr < field_list_list > result = allocator_base::field_values_get(); 00111 result->push_back( value_list::create() ); 00112 result->back()->push_back( this->function ); 00113 return result; 00114 } 00115 00116 00117 /*! 00118 Marking routine is used for garbage collection. 00119 \author lsg 00120 */ 00121 void local_variable_allocator_base::gc_mark() 00122 { 00123 allocator_base::gc_mark(); 00124 } 00125 00126 // End of class local_variable_allocator_base. 00127 00128 // ------------- Class global_variable_allocator_base follows. ------------- 00129 00130 /*! 00131 Generated constructor for class global_variable_allocator_base. 00132 \author lsg 00133 */ 00134 global_variable_allocator_base::global_variable_allocator_base () 00135 : allocator_base() 00136 {} 00137 00138 ptr< object::reflection_list > global_variable_allocator_base::reflection_get() const 00139 { 00140 if (!reflection) { 00141 typedef class_reflection::field_metadata md; 00142 typedef class_reflection::field_metadata_list mdlist; 00143 ptr<mdlist> mdl = mdlist::create(); 00144 reflection = reflection_list::create( allocator_base::reflection_get() ); 00145 reflection->push_back( class_reflection::create( "global_variable_allocator_base", mdl ) ); 00146 } 00147 return reflection; 00148 } 00149 00150 ptr< object::field_list_list > global_variable_allocator_base::field_values_get() const 00151 { 00152 ptr < field_list_list > result = allocator_base::field_values_get(); 00153 return result; 00154 } 00155 00156 00157 /*! 00158 Marking routine is used for garbage collection. 00159 \author lsg 00160 */ 00161 void global_variable_allocator_base::gc_mark() 00162 { 00163 allocator_base::gc_mark(); 00164 } 00165 00166 // End of class global_variable_allocator_base. 00167 00168 00169 // static data members follow 00170 ptr<object::reflection_list> allocator_base::reflection = reflection; 00171 ptr<object::reflection_list> local_variable_allocator_base::reflection = reflection; 00172 ptr<object::reflection_list> global_variable_allocator_base::reflection = reflection; 00173 00174 end_package(mem); 00175 end_package(md); 00176 end_package(lestes); 00177
1.5.1-20070107