00001
00002
00003 #include <lestes/lang/cplus/sem/lu_filter.g.hh>
00004 #include <lestes/lang/cplus/sem/ss_declaration.g.hh>
00005 #include <lestes/lang/cplus/sem/ss_misc.g.hh>
00006 #include <lestes/lang/cplus/sem/ss_type.g.hh>
00007
00008 #include <lestes/std/list.hh>
00009 #include <lestes/std/pair.hh>
00010 #include <lestes/std/reflect.hh>
00011
00012 #include <lestes/lang/cplus/sem/lu_lu.g.hh>
00013
00014 package(lestes);
00015 package(lang);
00016 package(cplus);
00017 package(sem);
00018
00019
00020
00021
00022
00023
00024
00025
00026 lu_params::using_directives_handling_type lu_params::using_directives_handling_get() const
00027 {
00028 return using_directives_handling;
00029 }
00030
00031
00032
00033
00034
00035 void lu_params::using_directives_handling_set(using_directives_handling_type x)
00036 {
00037 lu_params::using_directives_handling = x;
00038 }
00039
00040
00041
00042
00043
00044 lu_params::using_declarations_handling_type lu_params::using_declarations_handling_get() const
00045 {
00046 return using_declarations_handling;
00047 }
00048
00049
00050
00051
00052
00053 void lu_params::using_declarations_handling_set(using_declarations_handling_type x)
00054 {
00055 lu_params::using_declarations_handling = x;
00056 }
00057
00058
00059
00060
00061
00062 lu_params::parent_search_type lu_params::parent_search_get() const
00063 {
00064 return parent_search;
00065 }
00066
00067
00068
00069
00070
00071 void lu_params::parent_search_set(parent_search_type x)
00072 {
00073 lu_params::parent_search = x;
00074 }
00075
00076
00077
00078
00079
00080 ptr< ss_declaration_time > lu_params::time_get() const
00081 {
00082 return time;
00083 }
00084
00085
00086
00087
00088
00089 void lu_params::time_set(const ptr< ss_declaration_time > & x)
00090 {
00091 lu_params::time = x;
00092 }
00093
00094
00095
00096
00097
00098 ptr< lu_filter > lu_params::filter_get() const
00099 {
00100 return filter;
00101 }
00102
00103
00104
00105
00106
00107 void lu_params::filter_set(const ptr< lu_filter > & x)
00108 {
00109 lu_params::filter = x;
00110 }
00111
00112
00113
00114
00115
00116 ptr< lu_params > lu_params::create(using_directives_handling_type a__lu_params__using_directives_handling,
00117 using_declarations_handling_type a__lu_params__using_declarations_handling,
00118 parent_search_type a__lu_params__parent_search,
00119 ptr< ss_declaration_time > a__lu_params__time,
00120 ptr< lu_filter > a__lu_params__filter)
00121 {
00122 return ptr< lu_params > ( new lu_params(a__lu_params__using_directives_handling,
00123 a__lu_params__using_declarations_handling,
00124 a__lu_params__parent_search,
00125 a__lu_params__time,
00126 a__lu_params__filter) );
00127 }
00128
00129
00130
00131
00132
00133 lu_params::lu_params (using_directives_handling_type a__lu_params__using_directives_handling,
00134 using_declarations_handling_type a__lu_params__using_declarations_handling,
00135 parent_search_type a__lu_params__parent_search,
00136 ptr< ss_declaration_time > a__lu_params__time,
00137 ptr< lu_filter > a__lu_params__filter)
00138 : object(), using_directives_handling(a__lu_params__using_directives_handling), using_declarations_handling(a__lu_params__using_declarations_handling), parent_search(a__lu_params__parent_search), time(checked(a__lu_params__time)), filter(checked(a__lu_params__filter))
00139 {}
00140
00141 ptr< object::reflection_list > lu_params::reflection_get() const
00142 {
00143 if (!reflection) {
00144 typedef class_reflection::field_metadata md;
00145 typedef class_reflection::field_metadata_list mdlist;
00146 ptr<mdlist> mdl = mdlist::create();
00147 mdl->push_back( md::create( "using_directives_handling", "using_directives_handling_type" ) );
00148 mdl->push_back( md::create( "using_declarations_handling", "using_declarations_handling_type" ) );
00149 mdl->push_back( md::create( "parent_search", "parent_search_type" ) );
00150 mdl->push_back( md::create( "time", "ss_declaration_time" ) );
00151 mdl->push_back( md::create( "filter", "lu_filter" ) );
00152 reflection = reflection_list::create( ::lestes::std::object::reflection_get() );
00153 reflection->push_back( class_reflection::create( "lu_params", mdl ) );
00154 }
00155 return reflection;
00156 }
00157
00158 ptr< object::field_list_list > lu_params::field_values_get() const
00159 {
00160 ptr < field_list_list > result = ::lestes::std::object::field_values_get();
00161 result->push_back( value_list::create() );
00162 result->back()->push_back( objectize< using_directives_handling_type > ::create( this->using_directives_handling ) );
00163 result->push_back( value_list::create() );
00164 result->back()->push_back( objectize< using_declarations_handling_type > ::create( this->using_declarations_handling ) );
00165 result->push_back( value_list::create() );
00166 result->back()->push_back( objectize< parent_search_type > ::create( this->parent_search ) );
00167 result->push_back( value_list::create() );
00168 result->back()->push_back( this->time );
00169 result->push_back( value_list::create() );
00170 result->back()->push_back( this->filter );
00171 return result;
00172 }
00173
00174
00175
00176
00177
00178
00179 void lu_params::gc_mark()
00180 {
00181 ::lestes::std::object::gc_mark();
00182 }
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192 ptr< lu_params > lu_lookup::params_get() const
00193 {
00194 return params;
00195 }
00196
00197
00198
00199
00200
00201 void lu_lookup::params_set(const ptr< lu_params > & x)
00202 {
00203 lu_lookup::params = x;
00204 }
00205
00206
00207
00208
00209
00210 ptr< decl_seq_set_type > lu_lookup::visited_seqs_get() const
00211 {
00212 return visited_seqs;
00213 }
00214
00215
00216
00217
00218
00219 void lu_lookup::visited_seqs_set(const ptr< decl_seq_set_type > & x)
00220 {
00221 lu_lookup::visited_seqs = x;
00222 }
00223
00224
00225
00226
00227
00228 ptr< declaration_set_type > lu_lookup::lookup_result_get() const
00229 {
00230 return lookup_result;
00231 }
00232
00233
00234
00235
00236
00237 void lu_lookup::lookup_result_set(const ptr< declaration_set_type > & x)
00238 {
00239 lu_lookup::lookup_result = x;
00240 }
00241
00242
00243
00244
00245
00246 ptr< lu_lookup > lu_lookup::the_instance = the_instance;
00247
00248
00249
00250
00251
00252 ptr< lu_lookup > lu_lookup::instance()
00253 {
00254 return the_instance ? the_instance : the_instance = new lu_lookup(NULL, NULL, NULL);
00255 }
00256
00257
00258
00259
00260
00261 lu_lookup::lu_lookup (ptr< lu_params > a__lu_lookup__params,
00262 ptr< decl_seq_set_type > a__lu_lookup__visited_seqs,
00263 ptr< declaration_set_type > a__lu_lookup__lookup_result)
00264 : ss_declaration_default_visitor(), params(a__lu_lookup__params), visited_seqs(a__lu_lookup__visited_seqs), lookup_result(a__lu_lookup__lookup_result)
00265 {}
00266
00267 ptr< object::reflection_list > lu_lookup::reflection_get() const
00268 {
00269 if (!reflection) {
00270 typedef class_reflection::field_metadata md;
00271 typedef class_reflection::field_metadata_list mdlist;
00272 ptr<mdlist> mdl = mdlist::create();
00273 mdl->push_back( md::create( "params", "lu_params" ) );
00274 mdl->push_back( md::create( "visited_seqs", "decl_seq_set_type" ) );
00275 mdl->push_back( md::create( "lookup_result", "declaration_set_type" ) );
00276 reflection = reflection_list::create( ss_declaration_default_visitor::reflection_get() );
00277 reflection->push_back( class_reflection::create( "lu_lookup", mdl ) );
00278 }
00279 return reflection;
00280 }
00281
00282 ptr< object::field_list_list > lu_lookup::field_values_get() const
00283 {
00284 ptr < field_list_list > result = ss_declaration_default_visitor::field_values_get();
00285 result->push_back( value_list::create() );
00286 result->back()->push_back( this->params );
00287 result->push_back( value_list::create() );
00288 result->back()->push_back( this->visited_seqs );
00289 result->push_back( value_list::create() );
00290 result->back()->push_back( this->lookup_result );
00291 return result;
00292 }
00293
00294 ptr< declaration_set_type > lu_lookup::lookup_by_decl( const ptr< ::lestes::lang::cplus::sem::ss_declaration > & o )
00295 {
00296 lassert2( o, "Cannot visit NULL object." );
00297 o->accept_ss_declaration_visitor( ptr< ss_declaration_visitor >(this) );
00298 return lookup_result_get();
00299 }
00300
00301
00302
00303
00304
00305
00306 void lu_lookup::gc_mark()
00307 {
00308 ss_declaration_default_visitor::gc_mark();
00309 }
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319 ptr< lu_params > lu_lookup_in_type::params_get() const
00320 {
00321 return params;
00322 }
00323
00324
00325
00326
00327
00328 void lu_lookup_in_type::params_set(const ptr< lu_params > & x)
00329 {
00330 lu_lookup_in_type::params = x;
00331 }
00332
00333
00334
00335
00336
00337 ptr< declaration_set_type > lu_lookup_in_type::lookup_result_get() const
00338 {
00339 return lookup_result;
00340 }
00341
00342
00343
00344
00345
00346 void lu_lookup_in_type::lookup_result_set(const ptr< declaration_set_type > & x)
00347 {
00348 lu_lookup_in_type::lookup_result = x;
00349 }
00350
00351
00352
00353
00354
00355 ptr< lu_lookup_in_type > lu_lookup_in_type::the_instance = the_instance;
00356
00357
00358
00359
00360
00361 ptr< lu_lookup_in_type > lu_lookup_in_type::instance()
00362 {
00363 return the_instance ? the_instance : the_instance = new lu_lookup_in_type(NULL, NULL);
00364 }
00365
00366
00367
00368
00369
00370 lu_lookup_in_type::lu_lookup_in_type (ptr< lu_params > a__lu_lookup_in_type__params,
00371 ptr< declaration_set_type > a__lu_lookup_in_type__lookup_result)
00372 : ss_type_default_visitor(), params(a__lu_lookup_in_type__params), lookup_result(a__lu_lookup_in_type__lookup_result)
00373 {}
00374
00375 ptr< object::reflection_list > lu_lookup_in_type::reflection_get() const
00376 {
00377 if (!reflection) {
00378 typedef class_reflection::field_metadata md;
00379 typedef class_reflection::field_metadata_list mdlist;
00380 ptr<mdlist> mdl = mdlist::create();
00381 mdl->push_back( md::create( "params", "lu_params" ) );
00382 mdl->push_back( md::create( "lookup_result", "declaration_set_type" ) );
00383 reflection = reflection_list::create( ss_type_default_visitor::reflection_get() );
00384 reflection->push_back( class_reflection::create( "lu_lookup_in_type", mdl ) );
00385 }
00386 return reflection;
00387 }
00388
00389 ptr< object::field_list_list > lu_lookup_in_type::field_values_get() const
00390 {
00391 ptr < field_list_list > result = ss_type_default_visitor::field_values_get();
00392 result->push_back( value_list::create() );
00393 result->back()->push_back( this->params );
00394 result->push_back( value_list::create() );
00395 result->back()->push_back( this->lookup_result );
00396 return result;
00397 }
00398
00399 ptr< declaration_set_type > lu_lookup_in_type::lookup_by_type( const ptr< ::lestes::lang::cplus::sem::ss_type > & o )
00400 {
00401 lassert2( o, "Cannot visit NULL object." );
00402 o->accept_ss_type_visitor( ptr< ss_type_visitor >(this) );
00403 return lookup_result_get();
00404 }
00405
00406
00407
00408
00409
00410
00411 void lu_lookup_in_type::gc_mark()
00412 {
00413 ss_type_default_visitor::gc_mark();
00414 }
00415
00416
00417
00418
00419
00420 ptr<object::reflection_list> lu_params::reflection = reflection;
00421 ptr<object::reflection_list> lu_lookup::reflection = reflection;
00422 ptr<object::reflection_list> lu_lookup_in_type::reflection = reflection;
00423
00424 end_package(sem);
00425 end_package(cplus);
00426 end_package(lang);
00427 end_package(lestes);
00428