Dump_Visitor.cpp

Go to the documentation of this file.
00001 // Dump_Visitor.cpp,v 1.2 2003/07/23 18:21:59 dhinton Exp
00002 
00003 #include "Dump_Visitor.h"
00004 #include "ace/streams.h"
00005 
00006 Dump_Visitor::Dump_Visitor (int depth)
00007   : depth_ (depth)
00008 {
00009 }
00010 
00011 Dump_Visitor::~Dump_Visitor ()
00012 {
00013 
00014 }
00015 
00016 int
00017 Dump_Visitor::visit_module (TAO_PSDL_Module *module)
00018 {
00019   print_depth (this->depth_ + 10);
00020 
00021   cout << "MODULE {" << endl;
00022   if (module->identifier ()->accept (this) == -1)
00023     return -1;
00024 
00025   Dump_Visitor body_visitor (this->depth_ + 1);
00026   if (module->specification ()->accept (&body_visitor) == -1)
00027     return -1;
00028 
00029   return 0;
00030 }
00031 
00032 int
00033 Dump_Visitor::visit_identifier (TAO_PSDL_Identifier *identifier)
00034 {
00035   print_depth (this->depth_ + 40);
00036   cout << "IDENTIFIER {" << identifier->value () << "}\n" << endl;
00037   return 0;
00038 }
00039 
00040 int
00041 Dump_Visitor::visit_specification (TAO_PSDL_Specification *specification)
00042 {
00043   cout << "SPECIFICATION {" << endl;
00044   if (specification->definition ()->accept (this) == -1)
00045     return -1;
00046   if (specification->specification () != 0)
00047     {
00048       Dump_Visitor body_visitor (this->depth_ + 1);
00049       if (specification->specification ()->accept (&body_visitor) == -1)
00050         return -1;
00051     }
00052   return 0;
00053 }
00054 
00055 int
00056 Dump_Visitor::visit_definition (TAO_PSDL_Definition *definition)
00057 {
00058   print_depth (this->depth_ + 5);
00059   cout << "DEFINITION {" << endl;
00060   if (definition->definition_type ()->accept (this) == -1)
00061     return -1;
00062   return 0;
00063 }
00064 
00065 int
00066 Dump_Visitor::visit_abstract_storagetype (TAO_PSDL_Abstract_Storagetype *)
00067 {
00068   // @@ NOT YET SUPPORTED
00069   return 0;
00070 }
00071 
00072 int
00073 Dump_Visitor::visit_abstract_storagetype_dcl (TAO_PSDL_Abstract_Storagetype_Dcl *)
00074 {
00075   // @@ NOT YET SUPPORTED
00076   return 0;
00077 }
00078 
00079 int
00080 Dump_Visitor::visit_abstract_storagetype_fwd_dcl (TAO_PSDL_Abstract_Storagetype_Fwd_Dcl *)
00081 {
00082   // @@ NOT YET SUPPORTED
00083   return 0;
00084 }
00085 
00086 int
00087 Dump_Visitor::visit_abstract_storagetype_header (TAO_PSDL_Abstract_Storagetype_Header *)
00088 {
00089   // @@ NOT YET SUPPORTED
00090   return 0;
00091 }
00092 
00093 int
00094 Dump_Visitor::visit_abstract_storagetype_body (TAO_PSDL_Abstract_Storagetype_Body *)
00095 {
00096   // @@ NOT YET SUPPORTED
00097   return 0;
00098 }
00099 
00100 int
00101 Dump_Visitor::visit_abstract_storagetype_member (TAO_PSDL_Abstract_Storagetype_Member *)
00102 {
00103   // @@ NOT YET SUPPORTED
00104   return 0;
00105 }
00106 
00107 int
00108 Dump_Visitor::visit_abstract_storagetype_inh_spec (TAO_PSDL_Abstract_Storagetype_Inh_Spec *)
00109 {
00110   // @@ NOT YET SUPPORTED
00111   return 0;
00112 }
00113 
00114 int
00115 Dump_Visitor::visit_abstract_storagetype_name (TAO_PSDL_Abstract_Storagetype_Name *)
00116 {
00117   // @@ NOT YET SUPPORTED
00118   return 0;
00119 }
00120 
00121 int
00122 Dump_Visitor::visit_psdl_state_dcl (TAO_PSDL_Psdl_State_Dcl *)
00123 {
00124   // @@ NOT YET SUPPORTED
00125   return 0;
00126 }
00127 
00128 int
00129 Dump_Visitor::visit_psdl_state_type_spec (TAO_PSDL_Psdl_State_Type_Spec *)
00130 {
00131   // @@ NOT YET SUPPORTED
00132   return 0;
00133 }
00134 
00135 int
00136 Dump_Visitor::visit_abstract_storagetype_ref_type (TAO_PSDL_Abstract_Storagetype_Ref_Type)
00137 {
00138   // @@ NOT YET SUPPORTED
00139   return 0;
00140 }
00141 
00142 int
00143 Dump_Visitor::visit_abstract_storagehome (TAO_PSDL_Abstract_Storagehome *)
00144 {
00145   // @@ NOT YET SUPPORTED
00146   return 0;
00147 }
00148 
00149 int
00150 Dump_Visitor::visit_abstract_storagehome_fwd_dcl (TAO_PSDL_Abstract_Storagehome_Fwd_Dcl *)
00151 {
00152   // @@ NOT YET SUPPORTED
00153   return 0;
00154 }
00155 
00156 int
00157 Dump_Visitor::visit_abstract_storagehome_dcl (TAO_PSDL_Abstract_Storagehome_Dcl *)
00158 {
00159   // @@ NOT YET SUPPORTED
00160   return 0;
00161 }
00162 
00163 int
00164 Dump_Visitor::visit_abstract_storagehome_header (TAO_PSDL_Abstract_Storagehome_Header *)
00165 {
00166   // @@ NOT YET SUPPORTED
00167   return 0;
00168 }
00169 
00170 int
00171 Dump_Visitor::visit_abstract_storagehome_body (TAO_PSDL_Abstract_Storagehome_Body  *)
00172 {
00173   // @@ NOT YET SUPPORTED
00174   return 0;
00175 }
00176 
00177 int
00178 Dump_Visitor::visit_abstract_storagehome_member (TAO_PSDL_Abstract_Storagehome_Member *)
00179 {
00180   // @@ NOT YET SUPPORTED
00181   return 0;
00182 }
00183 
00184 int
00185 Dump_Visitor::visit_abstract_storagehome_inh_spec (TAO_PSDL_Abstract_Storagehome_Inh_Spec *)
00186 {
00187   // @@ NOT YET SUPPORTED
00188   return 0;
00189 }
00190 
00191 int
00192 Dump_Visitor::visit_abstract_storagehome_name (TAO_PSDL_Abstract_Storagehome_Name *)
00193 {
00194   // @@ NOT YET SUPPORTED
00195   return 0;
00196 }
00197 
00198 int
00199 Dump_Visitor::visit_local_op_dcl (TAO_PSDL_Local_Op_Dcl *local_op_dcl)
00200 {
00201   print_depth (this->depth_);
00202 
00203   cout << "LOCAL_OP_DCL {" << endl;
00204   if (local_op_dcl->op_type_spec ()->accept (this) == -1)
00205     return -1;
00206 
00207   if (local_op_dcl->identifier ()->accept (this) == -1)
00208     return -1;
00209 
00210   Dump_Visitor body_visitor (this->depth_ + 1);
00211 
00212   if (local_op_dcl->parameter_dcls ()->accept (this) == -1)
00213     return -1;
00214 
00215   if (local_op_dcl->raises_expr () != 0)
00216     {
00217       if (local_op_dcl->raises_expr ()->accept (&body_visitor) == -1)
00218         return -1;
00219     }
00220   return 0;
00221 }
00222 
00223 int
00224 Dump_Visitor::visit_key_dcl (TAO_PSDL_Key_Dcl *key_dcl)
00225 {
00226   print_depth (this->depth_);
00227 
00228   cout << "KEY_DCL {" << endl;
00229   if (key_dcl->identifier ()->accept (this) == -1)
00230     return -1;
00231 
00232   if (key_dcl->simple_declarator () != 0)
00233     if (key_dcl->simple_declarator ()->accept (this) == -1)
00234       return -1;
00235   return 0;
00236 }
00237 
00238 int
00239 Dump_Visitor::visit_catalog (TAO_PSDL_Catalog *)
00240 {
00241   // @@ NOT YET SUPPORTED
00242   return 0;
00243 }
00244 
00245 int
00246 Dump_Visitor::visit_catalog_inh_spec (TAO_PSDL_Catalog_Inh_Spec *)
00247 {
00248   // @@ NOT YET SUPPORTED
00249   return 0;
00250 }
00251 
00252 int
00253 Dump_Visitor::visit_catalog_name (TAO_PSDL_Catalog_Name *)
00254 {
00255   // @@ NOT YET SUPPORTED
00256   return 0;
00257 }
00258 
00259 int
00260 Dump_Visitor::visit_catalog_body (TAO_PSDL_Catalog_Body *)
00261 {
00262   // @@ NOT YET SUPPORTED
00263   return 0;
00264 }
00265 
00266 int
00267 Dump_Visitor::visit_catalog_member (TAO_PSDL_Catalog_Member *)
00268 {
00269   // @@ NOT YET SUPPORTED
00270   return 0;
00271 }
00272 
00273 int
00274 Dump_Visitor::visit_storagetype_member (TAO_PSDL_Storagetype_Member *)
00275 {
00276   // @@ NOT YET SUPPORTED
00277   return 0;
00278 }
00279 
00280 int
00281 Dump_Visitor::visit_storagetype_inh_spec (TAO_PSDL_Storagetype_Inh_Spec *)
00282 {
00283   // @@ NOT YET SUPPORTED
00284   return 0;
00285 }
00286 
00287 int
00288 Dump_Visitor::visit_storagetype_name (TAO_PSDL_Storagetype_Name *storagetype_name)
00289 {
00290   print_depth (this->depth_ + 10);
00291 
00292   cout << "STORAGETYPE_NAME {" << endl;
00293   if (storagetype_name->scoped_name ()->accept (this) == -1)
00294     return -1;
00295 
00296   return 0;
00297 }
00298 
00299 int
00300 Dump_Visitor::visit_storagetype_impl_spec (TAO_PSDL_Storagetype_Impl_Spec *)
00301 {
00302   // @@ NOT YET SUPPORTED
00303   return 0;
00304 }
00305 
00306 int
00307 Dump_Visitor::visit_storagetype_ref_type (TAO_PSDL_Storagetype_Ref_Type *)
00308 {
00309   // @@ NOT YET SUPPORTED
00310   return 0;
00311 }
00312 
00313 int
00314 Dump_Visitor::visit_store_directive (TAO_PSDL_Store_Directive *)
00315 {
00316   // @@ NOT YET SUPPORTED
00317   return 0;
00318 }
00319 
00320 int
00321 Dump_Visitor::visit_psdl_concrete_state_type (TAO_PSDL_Psdl_Concrete_State_Type *)
00322 {
00323   // @@ NOT YET SUPPORTED
00324   return 0;
00325 }
00326 
00327 int
00328 Dump_Visitor::visit_ref_rep_directive (TAO_PSDL_Ref_Rep_Directive *)
00329 {
00330   // @@ NOT YET SUPPORTED
00331   return 0;
00332 }
00333 
00334 int
00335 Dump_Visitor::visit_storagehome (TAO_PSDL_Storagehome *storagehome)
00336 {
00337   print_depth (this->depth_ + 10);
00338 
00339   cout << "STORAGEHOME {" << endl;
00340   if (storagehome->storagehome_header ()->accept (this) == -1)
00341     return -1;
00342 
00343   Dump_Visitor body_visitor (this->depth_ + 1);
00344   if (storagehome->storagehome_body () != 0)
00345     if (storagehome->storagehome_body ()->accept (&body_visitor) == -1)
00346       return -1;
00347   return 0;
00348 }
00349 
00350 int
00351 Dump_Visitor::visit_storagehome_header (TAO_PSDL_Storagehome_Header *sh_header)
00352 {
00353   print_depth (this->depth_ + 10);
00354 
00355   cout << "STORAGEHOME_HEADER {" << endl;
00356   if (sh_header->identifier ()->accept (this) == -1)
00357     return -1;
00358 
00359   if (sh_header->storagetype_name ()->accept (this) == -1)
00360     return -1;
00361 
00362   Dump_Visitor body_visitor (this->depth_ + 1);
00363   if (sh_header->storagehome_inh_spec () != 0)
00364     if (sh_header->storagehome_inh_spec ()->accept (&body_visitor) == -1)
00365       return -1;
00366 
00367   if (sh_header->storagehome_impl_spec () != 0)
00368     if (sh_header->storagehome_impl_spec ()->accept (&body_visitor) == -1)
00369       return -1;
00370 
00371   return 0;
00372 }
00373 
00374 int
00375 Dump_Visitor::visit_storagehome_body  (TAO_PSDL_Storagehome_Body *sh_body)
00376 {
00377   print_depth (this->depth_ + 10);
00378 
00379   cout << "STORAGEHOME_BODY {" << endl;
00380   if (sh_body->storagehome_member ()->accept (this) == -1)
00381     return -1;
00382 
00383   Dump_Visitor body_visitor (this->depth_ + 1);
00384   if (sh_body->storagehome_body () != 0)
00385     if (sh_body->storagehome_body ()->accept (&body_visitor) == -1)
00386       return -1;
00387   return 0;
00388 }
00389 
00390 int
00391 Dump_Visitor::visit_storagehome_member  (TAO_PSDL_Storagehome_Member *sh_member)
00392 {
00393   print_depth (this->depth_ + 10);
00394 
00395   cout << "STORAGEHOME_MEMBER {" << endl;
00396   if (sh_member->key_dcl ()->accept (this) == -1)
00397     return -1;
00398   return 0;
00399 }
00400 
00401 int
00402 Dump_Visitor::visit_storagehome_inh_spec  (TAO_PSDL_Storagehome_Inh_Spec *sh_inh_spec)
00403 {
00404   print_depth (this->depth_ + 10);
00405 
00406   cout << "STORAGEHOME_INH_SPEC {" << endl;
00407   if (sh_inh_spec->storagehome_name ()->accept (this) == -1)
00408     return -1;
00409   return 0;
00410 }
00411 
00412 int
00413 Dump_Visitor::visit_storagehome_name  (TAO_PSDL_Storagehome_Name *sh_name)
00414 {
00415   print_depth (this->depth_ + 10);
00416 
00417   cout << "STORAGEHOME_NAME {" << endl;
00418   if (sh_name->scoped_name ()->accept (this) == -1)
00419     return -1;
00420   return 0;
00421 }
00422 
00423 int
00424 Dump_Visitor::visit_storagehome_impl_spec (TAO_PSDL_Storagehome_Impl_Spec *sh_impl_spec)
00425 {
00426   print_depth (this->depth_ + 10);
00427 
00428   cout << "STORAGEHOME_IMPL_SPEC {" << endl;
00429   if (sh_impl_spec->abstract_storagehome_name ()->accept (this) == -1)
00430     return -1;
00431   return 0;
00432 }
00433 
00434 int
00435 Dump_Visitor::visit_primary_key_dcl (TAO_PSDL_Primary_Key_Dcl *primary_key_dcl)
00436 {
00437   print_depth (this->depth_ + 10);
00438 
00439   cout << "PRIMARY_KEY_DCL {" << endl;
00440   if (primary_key_dcl->identifier ()->accept (this) == -1)
00441     return -1;
00442   return 0;
00443 }
00444 
00445 int
00446 Dump_Visitor::visit_type_dcl (TAO_PSDL_Type_Dcl *type_dcl)
00447 {
00448   print_depth (this->depth_ + 10);
00449   cout << "TYPE_DCL {" << endl;
00450 
00451   print_depth (this->depth_ + 15);
00452   if (type_dcl->key_word () != 0)
00453     {
00454       cout << "KEY_WORD------------------------ {";
00455       cout << type_dcl->key_word () << "}" << endl;
00456     }
00457 
00458   if (type_dcl->type_of_type_dcl ()->accept (this) == -1)
00459     return -1;
00460 
00461   return 0;
00462 }
00463 
00464 int
00465 Dump_Visitor::visit_type_declarator (TAO_PSDL_Type_Declarator *type_declarator)
00466 {
00467   print_depth (this->depth_ + 15);
00468   cout << "TYPE_DECLARATOR {" << endl;
00469 
00470   if (type_declarator->type_spec ()->accept (this) == -1)
00471     return -1;
00472 
00473   Dump_Visitor body_visitor (this->depth_);
00474   if (type_declarator->declarators ()->accept (&body_visitor) == -1)
00475     return -1;
00476 
00477   return 0;
00478 }
00479 
00480 int
00481 Dump_Visitor::visit_type_spec (TAO_PSDL_Type_Spec *type_spec)
00482 {
00483   print_depth (this->depth_ + 20);
00484   cout << "TYPE_SPEC {" << endl;
00485   if (type_spec->type_of_type_spec ()->accept (this) == -1)
00486     return -1;
00487   return 0;
00488 }
00489 
00490 int
00491 Dump_Visitor::visit_simple_type_spec  (TAO_PSDL_Simple_Type_Spec *simple_type_spec)
00492 {
00493   print_depth (this->depth_ + 25);
00494   cout << "SIMPLE TYPE_SPEC {" << endl;
00495   if (simple_type_spec->type_of_simple_type_spec ()->accept (this) == -1)
00496     return -1;
00497   return 0;
00498 }
00499 
00500 int
00501 Dump_Visitor::visit_base_type_spec  (TAO_PSDL_Base_Type_Spec *base_type_spec)
00502 {
00503   print_depth (this->depth_ + 25);
00504   cout << "BASE TYPE_SPEC " << endl;
00505   if (base_type_spec->type_of_base_type_spec ()->accept (this) == -1)
00506     return -1;
00507   return 0;
00508 }
00509 
00510 int
00511 Dump_Visitor::visit_template_type_spec  (TAO_PSDL_Template_Type_Spec *template_type_spec)
00512 {
00513   print_depth (this->depth_ + 30);
00514   cout << "TEMPLATE_TYPE_SPEC {" << endl;
00515 
00516   if (template_type_spec->type_of_template_type_spec ()->accept (this) == -1)
00517     return -1;
00518   return 0;
00519 }
00520 
00521 int
00522 Dump_Visitor::visit_constr_type_spec  (TAO_PSDL_Constr_Type_Spec *)
00523 {
00524   // @@ NOT YET SUPPORTED
00525   return 0;
00526 }
00527 
00528 int
00529 Dump_Visitor::visit_declarators  (TAO_PSDL_Declarators *declarators)
00530 {
00531   print_depth (this->depth_ + 15);
00532   cout << "DECLARATORS {" << endl;
00533 
00534   if (declarators->declarator ()->accept (this) == -1)
00535     return -1;
00536 
00537   if (declarators->set_of_declarators () != 0)
00538     {
00539       Dump_Visitor body_visitor (this->depth_ + 1);
00540 
00541       if (declarators->set_of_declarators ()->accept (&body_visitor) == -1)
00542         return -1;
00543     }
00544   return 0;
00545 }
00546 
00547 int
00548 Dump_Visitor::visit_declarator  (TAO_PSDL_Declarator *declarator)
00549 {
00550   print_depth (this->depth_ + 20);
00551   cout << "DECLARATOR {" << endl;
00552   if (declarator->type_of_declarator ()->accept (this) == -1)
00553     return -1;
00554   return 0;
00555 }
00556 
00557 int
00558 Dump_Visitor::visit_simple_declarator  (TAO_PSDL_Simple_Declarator *simple_declarator)
00559 {
00560   print_depth (this->depth_ + 25);
00561   cout << "SIMPLE_DECLARATOR {" << endl;
00562 
00563   if (simple_declarator->identifier ()->accept (this) == -1)
00564     return -1;
00565 
00566   if (simple_declarator->simple_declarator () != 0)
00567     {
00568       Dump_Visitor body_visitor (this->depth_ + 1);
00569       if (simple_declarator->simple_declarator ()->accept (&body_visitor) == -1)
00570         return -1;
00571     }
00572   return 0;
00573 }
00574 
00575 int
00576 Dump_Visitor::visit_simple_declarator_list  (TAO_PSDL_Simple_Declarator_List *simple_decl_list)
00577 {
00578   print_depth (this->depth_ + 25);
00579   cout << "SIMPLE_DECLARATOR_LIST {" << endl;
00580 
00581   if (simple_decl_list-> simple_declarator ()->accept (this) == -1)
00582     return -1;
00583 
00584   if (simple_decl_list->simple_declarator_list () != 0)
00585     {
00586       Dump_Visitor body_visitor (this->depth_ + 1);
00587       if (simple_decl_list->simple_declarator_list ()->accept (&body_visitor) == -1)
00588         return -1;
00589     }
00590   return 0;
00591 }
00592 
00593 int
00594 
00595 
00596 
00597 
00598 
00599 
00600 
00601 
00602 
00603 
00604 
00605 
00606 
00607 
00608 
00609 
00610 
00611 
00612 
00613 
00614 
00615 
00616 
00617 
00618 
00619 
00620 
00621 
00622 
00623 
00624 
00625 
00626 
00627 
00628 
00629 
00630 
00631 Dump_Visitor::visit_complex_declarator  (TAO_PSDL_Complex_Declarator *complex_declarator)
00632 {
00633   print_depth (this->depth_ + 25);
00634   cout << "COMPLEX_DECLARATOR {" << endl;
00635 
00636   if (complex_declarator->array_declarator ()->accept (this) == -1)
00637     return -1;
00638   return 0;
00639 }
00640 
00641 int
00642 
00643 
00644 
00645 
00646 
00647 
00648 
00649 
00650 
00651 
00652 
00653 
00654 
00655 
00656 
00657 
00658 
00659 
00660 
00661 
00662 
00663 
00664 
00665 
00666 
00667 
00668 
00669 
00670 
00671 
00672 
00673 
00674 
00675 
00676 
00677 
00678 
00679 
00680 
00681 
00682 
00683 
00684 
00685 
00686 
00687 
00688 Dump_Visitor::visit_predefined_type  (TAO_PSDL_Predefined_Type *predefined_type)
00689 {
00690   print_depth (this->depth_ + 40);
00691   cout << "PREDEFINED_TYPE " ;
00692 
00693   if (predefined_type->type_one () != 0)
00694     cout << "{" << predefined_type->type_one () << "}" << endl;
00695 
00696   if (predefined_type->type_two () != 0)
00697     cout << "{" << predefined_type->type_two () << "}" << endl;
00698 
00699   if (predefined_type->type_three () != 0)
00700     cout << "{" << predefined_type->type_three () << "}" << endl;
00701 
00702   Dump_Visitor body_visitor (this->depth_ + 1);
00703   if (predefined_type->type_of_variable_one () != 0)
00704     {
00705       cout << endl;
00706       if (predefined_type->type_of_variable_one ()->accept (&body_visitor) == -1)
00707         return -1;
00708     }
00709   if (predefined_type->type_of_variable_two () != 0)
00710     {
00711       cout << endl;
00712       if (predefined_type->type_of_variable_two ()->accept (&body_visitor) == -1)
00713         return -1;
00714     }
00715   if (predefined_type->type_of_variable_three () != 0)
00716     {
00717       cout << endl;
00718       if (predefined_type->type_of_variable_three ()->accept (&body_visitor) == -1)
00719         return -1;
00720     }
00721   return 0;
00722 }
00723 
00724 int
00725 
00726 
00727 
00728 
00729 
00730 
00731 
00732 
00733 
00734 
00735 
00736 
00737 
00738 
00739 
00740 
00741 
00742 
00743 
00744 
00745 
00746 
00747 
00748 
00749 
00750 
00751 
00752 
00753 
00754 
00755 
00756 
00757 
00758 
00759 
00760 
00761 
00762 
00763 
00764 
00765 
00766 
00767 
00768 
00769 
00770 
00771 
00772 
00773 
00774 
00775 
00776 
00777 
00778 
00779 
00780 
00781 
00782 
00783 
00784 
00785 
00786 
00787 
00788 
00789 
00790 
00791 
00792 
00793 
00794 
00795 
00796 
00797 
00798 
00799 
00800 
00801 
00802 
00803 
00804 
00805 
00806 Dump_Visitor::visit_member_list (TAO_PSDL_Member_List *member_list)
00807 {
00808   print_depth (this->depth_ + 15);
00809 
00810   cout << "MEMBER_LIST {" << endl;
00811   if (member_list->member ()->accept (this) == -1)
00812     return -1;
00813 
00814   if (member_list->member_list () != 0)
00815     {
00816       Dump_Visitor body_visitor (this->depth_ + 1);
00817 
00818       if (member_list->member_list ()->accept (&body_visitor) == -1)
00819         return -1;
00820     }
00821   return 0;
00822 }
00823 
00824 int
00825 
00826 
00827 
00828 
00829 
00830 
00831 
00832 
00833 
00834 
00835 
00836 
00837 
00838 
00839 
00840 
00841 
00842 
00843 
00844 
00845 
00846 
00847 
00848 
00849 
00850 
00851 
00852 
00853 
00854 
00855 
00856 
00857 
00858 
00859 
00860 
00861 
00862 
00863 
00864 
00865 
00866 
00867 
00868 
00869 
00870 
00871 
00872 
00873 
00874 
00875 
00876 
00877 
00878 
00879 
00880 
00881 
00882 
00883 
00884 
00885 
00886 
00887 
00888 
00889 
00890 
00891 
00892 
00893 
00894 
00895 
00896 
00897 
00898 
00899 
00900 
00901 
00902 
00903 
00904 
00905 
00906 
00907 
00908 
00909 
00910 
00911 
00912 
00913 
00914 
00915 
00916 
00917 
00918 
00919 
00920 
00921 
00922 
00923 Dump_Visitor::visit_member (TAO_PSDL_Member *member)
00924 {
00925   print_depth (this->depth_ + 15);
00926 
00927   cout << "MEMBER {" << endl;
00928   if (member->type_spec ()->accept (this) == -1)
00929     return -1;
00930 
00931   Dump_Visitor body_visitor (this->depth_ + 1);
00932 
00933   if (member->declarators ()->accept (&body_visitor) == -1)
00934     return -1;
00935   return 0;
00936 }
00937 
00938 int
00939 Dump_Visitor::visit_union_type (TAO_PSDL_Union_Type *)
00940 {
00941   // @@ NOT YET SUPPORTED
00942   return 0;
00943 }
00944 
00945 int
00946 Dump_Visitor::visit_switch_type_spec (TAO_PSDL_Switch_Type_Spec *)
00947 {
00948   // @@ NOT YET SUPPORTED
00949   return 0;
00950 }
00951 
00952 int
00953 Dump_Visitor::visit_switch_body (TAO_PSDL_Switch_Body *)
00954 {
00955   // @@ NOT YET SUPPORTED
00956   return 0;
00957 }
00958 
00959 int
00960 Dump_Visitor::visit_case_case (TAO_PSDL_Case *)
00961 {
00962  // @@ NOT YET SUPPORTED
00963  return 0;
00964 }
00965 
00966 int
00967 Dump_Visitor::visit_case_label (TAO_PSDL_Case_Label *)
00968 {
00969   // @@ NOT YET SUPPORTED
00970   return 0;
00971 }
00972 
00973 int
00974 Dump_Visitor::visit_element_spec (TAO_PSDL_Element_Spec *)
00975 {
00976   // @@ NOT YET SUPPORTED
00977  return 0;
00978  }
00979 
00980 int
00981 Dump_Visitor::visit_const_dcl (TAO_PSDL_Const_Dcl *const_dcl)
00982 {
00983   print_depth (this->depth_ + 10);
00984 
00985   cout << "CONST_DCL" << endl;
00986 
00987   if (const_dcl->const_type () != 0)
00988     {
00989       if (const_dcl->const_type ()->accept (this) == -1)
00990         return -1;
00991     }
00992 
00993   Dump_Visitor body_visitor (this->depth_ + 1);
00994   if (const_dcl->identifier ()->accept (&body_visitor) == -1)
00995     return -1;
00996 
00997   if (const_dcl->const_exp ()->accept (&body_visitor) == -1)
00998     return -1;
00999 
01000   return 0;
01001 }
01002 
01003 int
01004 Dump_Visitor::visit_const_type (TAO_PSDL_Const_Type *const_type)
01005 {
01006   print_depth (this->depth_);
01007 
01008   cout << "CONST_TYPE";
01009   if (const_type->type ()->accept (this) == -1)
01010     return -1;
01011 
01012   return 0;
01013 }
01014 
01015 int
01016 Dump_Visitor::visit_const_exp (TAO_PSDL_Const_Exp *)
01017 {
01018   // @@ NOT YET SUPPORTED
01019   return 0;
01020 }
01021 
01022 int
01023 Dump_Visitor::visit_or_expr (TAO_PSDL_Or_Expr *)
01024 {
01025   // @@ NOT YET SUPPORTED
01026   return 0;
01027 }
01028 
01029 int
01030 Dump_Visitor::visit_xor_expr (TAO_PSDL_Xor_Expr *)
01031 {
01032   // @@ NOT YET SUPPORTED
01033   return 0;
01034 }
01035 
01036 int
01037 Dump_Visitor::visit_and_expr (TAO_PSDL_And_Expr *)
01038 {
01039   // @@ NOT YET SUPPORTED
01040   return 0;
01041 }
01042 
01043 int
01044 Dump_Visitor::visit_shift_expr (TAO_PSDL_Shift_Expr *)
01045 {
01046   // @@ NOT YET SUPPORTED
01047   return 0;
01048 }
01049 
01050 int
01051 Dump_Visitor::visit_add_expr (TAO_PSDL_Add_Expr *)
01052 {
01053   // @@ NOT YET SUPPORTED
01054   return 0;
01055 }
01056 
01057 int
01058 Dump_Visitor::visit_mult_expr (TAO_PSDL_Mult_Expr *)
01059 {
01060   // @@ NOT YET SUPPORTED
01061   return 0;
01062 }
01063 
01064 int
01065 Dump_Visitor::visit_unary_expr (TAO_PSDL_Unary_Expr *)
01066 {
01067   // @@ NOT YET SUPPORTED
01068   return 0;
01069 }
01070 
01071 int
01072 Dump_Visitor::visit_primary_expr (TAO_PSDL_Primary_Expr *)
01073 {
01074   // @@ NOT YET SUPPORTED
01075   return 0;
01076 }
01077 
01078 int
01079 Dump_Visitor::visit_except_dcl (TAO_PSDL_Except_Dcl *except_dcl)
01080 {
01081   print_depth (this->depth_ + 10);
01082 
01083   cout << "EXCEPT_DCL " << endl;
01084   if (except_dcl->identifier ()->accept (this) == -1)
01085     return -1;
01086 
01087   Dump_Visitor body_visitor (this->depth_ + 1);
01088   if (except_dcl->member_list () != 0)
01089     {
01090       if (except_dcl->member_list ()->accept (&body_visitor) == -1)
01091         return -1;
01092     }
01093   return 0;
01094 }
01095 
01096 int
01097 Dump_Visitor::visit_op_dcl (TAO_PSDL_Op_Dcl *op_dcl)
01098 {
01099   print_depth (this->depth_);
01100 
01101   cout << "OP_DCL {" << endl;
01102 
01103   if (op_dcl->op_attribute () != 0)
01104     if (op_dcl->op_attribute ()->accept (this) == -1)
01105       return -1;
01106 
01107   if (op_dcl->op_type_spec ()->accept (this) == -1)
01108     return -1;
01109 
01110   if (op_dcl->identifier ()->accept (this) == -1)
01111     return -1;
01112 
01113   Dump_Visitor body_visitor (this->depth_ + 1);
01114 
01115   if (op_dcl->parameter_dcls ()->accept (this) == -1)
01116     return -1;
01117 
01118   if (op_dcl->raises_expr () != 0)
01119     if (op_dcl->raises_expr ()->accept (&body_visitor) == -1)
01120       return -1;
01121 
01122   if (op_dcl->context_expr () != 0)
01123     if (op_dcl->context_expr ()->accept (&body_visitor) == -1)
01124       return -1;
01125 
01126   return 0;
01127 }
01128 
01129 int
01130 Dump_Visitor::visit_storagetype (TAO_PSDL_Storagetype *storagetype)
01131 {
01132   print_depth (this->depth_ + 10);
01133 
01134   cout << "STORAGETYPE {" << endl;
01135 
01136   if (storagetype->declaration () != 0)
01137     if (storagetype->declaration ()->accept (this) == -1)
01138       return -1;
01139   return 0;
01140 }
01141 
01142 int
01143 Dump_Visitor::visit_storagetype_dcl (TAO_PSDL_Storagetype_Dcl *)
01144 {
01145   // @@ NOT YET SUPPORTED
01146   return 0;
01147 }
01148 
01149 int
01150 Dump_Visitor::visit_storagetype_fwd_dcl (TAO_PSDL_Storagetype_Fwd_Dcl *)
01151 {
01152   // @@ NOT YET SUPPORTED
01153   return 0;
01154 }
01155 
01156 int
01157 Dump_Visitor::visit_storagetype_header (TAO_PSDL_Storagetype_Header *)
01158 {
01159   // @@ NOT YET SUPPORTED
01160   return 0;
01161 }
01162 
01163 int
01164 Dump_Visitor::visit_storagetype_body (TAO_PSDL_Storagetype_Body *)
01165 {
01166   // @@ NOT YET SUPPORTED
01167   return 0;
01168 }
01169 
01170 int
01171 Dump_Visitor::visit_storagehome_scope (TAO_PSDL_Storagehome_Scope *)
01172 {
01173   // @@ NOT YET SUPPORTED
01174   return 0;
01175 }
01176 
01177 int
01178 Dump_Visitor::visit_provides_dcl (TAO_PSDL_Provides_Dcl *)
01179 {
01180   // @@ NOT YET SUPPORTED
01181   return 0;
01182 }
01183 
01184 int
01185 Dump_Visitor::visit_op_type_spec (TAO_PSDL_Op_Type_Spec *op_type_spec)
01186 {
01187   print_depth (this->depth_);
01188 
01189   cout << "OP_TYPE_SPEC {" << endl;
01190   if (op_type_spec->type () != 0)
01191     {
01192       cout << "Type {" << op_type_spec->type () << "}" << endl;
01193     }
01194 
01195   if (op_type_spec->type_spec () != 0)
01196     if (op_type_spec->type_spec ()->accept (this) == -1)
01197       return -1;
01198 
01199   return 0;
01200 }
01201 
01202 int
01203 Dump_Visitor::visit_parameter_dcls (TAO_PSDL_Parameter_Dcls *parameter_dcls)
01204 {
01205   print_depth (this->depth_);
01206 
01207   cout << "PARAMETER_DCLS {" << endl;
01208   if (parameter_dcls->param_dcl () != 0)
01209     if (parameter_dcls->param_dcl ()->accept (this) == -1)
01210       return -1;
01211 
01212   return 0;
01213 }
01214 
01215 int
01216 Dump_Visitor::visit_param_dcl (TAO_PSDL_Param_Dcl *param_dcl)
01217 {
01218   print_depth (this->depth_);
01219 
01220   cout << "PARAM_DCL {" << endl;
01221   if (param_dcl->param_attribute ()->accept (this) == -1)
01222     return -1;
01223 
01224   Dump_Visitor body_visitor (this->depth_ + 1);
01225 
01226   if (param_dcl->param_type_spec ()->accept (&body_visitor) == -1)
01227     return -1;
01228 
01229   Dump_Visitor body_visitor_two (this->depth_ + 2);
01230 
01231   if (param_dcl->simple_declarator ()->accept (&body_visitor) == -1)
01232     return -1;
01233 
01234   if (param_dcl->param_dcl () != 0)
01235     if (param_dcl->param_dcl ()->accept (&body_visitor) == -1)
01236       return -1;
01237 
01238   return 0;
01239 }
01240 
01241 int
01242 Dump_Visitor::visit_raises_expr (TAO_PSDL_Raises_Expr *raises_expr)
01243 {
01244   print_depth (this->depth_);
01245 
01246   cout << "RAISES_EXPR ";
01247   if (raises_expr->first_scoped_name ()->accept (this) == -1)
01248     return -1;
01249 
01250   if (raises_expr->second_scoped_name () != 0)
01251     if (raises_expr->first_scoped_name ()->accept (this) == -1)
01252       return -1;
01253   return 0;
01254 }
01255 
01256 int
01257 Dump_Visitor::visit_context_expr (TAO_PSDL_Context_Expr *context_expr)
01258 {
01259   print_depth (this->depth_);
01260 
01261   cout << "CONTEXT_EXPR ";
01262   if (context_expr->string_literal ()->accept (this) == -1)
01263     return -1;
01264   return 0;
01265 }
01266 
01267 int
01268 Dump_Visitor::visit_param_type_spec (TAO_PSDL_Param_Type_Spec *param_type_spec)
01269 {
01270   print_depth (this->depth_);
01271 
01272   cout << "PARAM_TYPE_SPEC {" << endl;
01273   if (param_type_spec->type_of_param ()->accept (this) == -1)
01274     return -1;
01275   return 0;
01276 }
01277 
01278 int
01279 Dump_Visitor::visit_fixed_pt_type (TAO_PSDL_Fixed_Pt_Type *fixed_pt_type)
01280 {
01281   print_depth (this->depth_);
01282 
01283   cout << "FIXED_PT_TYPE ";
01284   if (fixed_pt_type->positive_int_const_one ()->accept (this) == -1)
01285     return -1;
01286 
01287   if (fixed_pt_type->positive_int_const_two ()->accept (this) == -1)
01288     return -1;
01289 
01290   return 0;
01291 }
01292 
01293 int
01294 Dump_Visitor::visit_constr_forward_decl (TAO_PSDL_Constr_Forward_Decl *constr_fwd_dcl)
01295 {
01296   print_depth (this->depth_);
01297 
01298   cout << "CONSTR_FWD_DCL ";
01299   if (constr_fwd_dcl->type ()->accept (this) == -1)
01300     return -1;
01301 
01302   if (constr_fwd_dcl->identifier ()->accept (this) == -1)
01303     return -1;
01304 
01305   return 0;
01306 }
01307 
01308 int
01309 Dump_Visitor::visit_interface (TAO_PSDL_Interface *interface)
01310 {
01311   print_depth (this->depth_ + 10);
01312 
01313   cout << "INTERFACE {" << endl;
01314   if (interface->type_of_dcl ()->accept (this) == -1)
01315     return -1;
01316 
01317   return 0;
01318 }
01319 
01320 int
01321 Dump_Visitor::visit_interface_body (TAO_PSDL_Interface_Body *interface_body)
01322 {
01323   print_depth (this->depth_ + 15);
01324 
01325   cout << "INTERFACE_BODY {" << endl;
01326   if (interface_body->export_variable ()->accept (this) == -1)
01327     return -1;
01328 
01329   if (interface_body->interface_body () != 0)
01330     {
01331       Dump_Visitor body_visitor (this->depth_ + 1);
01332       if (interface_body->interface_body ()->accept (&body_visitor) == -1)
01333         return -1;
01334     }
01335   return 0;
01336 }
01337 
01338 int
01339 Dump_Visitor::visit_interface_dcl (TAO_PSDL_Interface_Dcl *interface_dcl)
01340 {
01341   print_depth (this->depth_ + 15);
01342 
01343   cout << "INTERFACE_DCL {" << endl;
01344   if (interface_dcl->interface_header ()->accept (this) == -1)
01345     return -1;
01346 
01347   if (interface_dcl->interface_body () != 0)
01348     {
01349       Dump_Visitor body_visitor (this->depth_ + 1);
01350       if (interface_dcl->interface_body ()->accept (&body_visitor) == -1)
01351         return -1;
01352     }
01353   return 0;
01354 }
01355 
01356 int
01357 Dump_Visitor::visit_forward_dcl (TAO_PSDL_Forward_Dcl *forward_dcl)
01358 {
01359   print_depth (this->depth_ + 15);
01360 
01361   cout << "FORWARD_DCL {" << endl;
01362   if (forward_dcl->identifier ()->accept (this) == -1)
01363     return -1;
01364 
01365   if (forward_dcl->type () != 0)
01366     {
01367       cout << "{" << forward_dcl->type () << "}" << endl;
01368     }
01369   return 0;
01370 }
01371 
01372 int
01373 Dump_Visitor::visit_interface_header (TAO_PSDL_Interface_Header *interface_header)
01374 {
01375   print_depth (this->depth_ + 15);
01376 
01377   cout << "INTERFACE_HEADER {" << endl;
01378   if (interface_header->identifier ()->accept (this) == -1)
01379     return -1;
01380 
01381   Dump_Visitor body_visitor (this->depth_ + 1);
01382   if (interface_header->type () != 0)
01383     {
01384       if (interface_header->type ()->accept (&body_visitor) == -1)
01385         return -1;
01386     }
01387 
01388   if (interface_header->interface_inheritance_spec () != 0)
01389     {
01390       if (interface_header->interface_inheritance_spec ()->accept (&body_visitor) == -1)
01391         return -1;
01392     }
01393   return 0;
01394 }
01395 
01396 int
01397 Dump_Visitor::visit_export_dcl (TAO_PSDL_Export_Dcl *export_dcl)
01398 {
01399   print_depth (this->depth_ + 15);
01400 
01401   cout << "EXPORT_DCL {" << endl;
01402   print_depth (this->depth_ + 5);
01403   if (export_dcl->type_of_export_one ()->accept (this) == -1)
01404     return -1;
01405 
01406   if (export_dcl->type_of_export_two () != 0)
01407     {
01408       Dump_Visitor body_visitor (this->depth_ + 1);
01409       if (export_dcl->type_of_export_two ()->accept (&body_visitor) == -1)
01410         return -1;
01411     }
01412   return 0;
01413 }
01414 
01415 int
01416 Dump_Visitor::visit_interface_inheritance_spec (TAO_PSDL_Interface_Inheritance_Spec *interface_inh_spec)
01417 {
01418   print_depth (this->depth_);
01419 
01420   cout << "INTERFACE_INH_SPEC ";
01421   if (interface_inh_spec->interface_name ()->accept (this) == -1)
01422     return -1;
01423 
01424   return 0;
01425 }
01426 
01427 int
01428 Dump_Visitor::visit_interface_name (TAO_PSDL_Interface_Name *interface_name)
01429 {
01430   print_depth (this->depth_);
01431 
01432   cout << "INTERFACE_NAME ";
01433   if (interface_name->scoped_name ()->accept (this) == -1)
01434     return -1;
01435 
01436   if (interface_name->interface_name () != 0)
01437     {
01438       Dump_Visitor body_visitor (this->depth_ + 1);
01439       if (interface_name->interface_name ()->accept (&body_visitor) == -1)
01440         return -1;
01441     }
01442   return 0;
01443 }
01444 
01445 int
01446 Dump_Visitor::visit_scoped_name (TAO_PSDL_Scoped_Name *scoped_name)
01447 {
01448   print_depth (this->depth_ + 40);
01449 
01450   cout << "SCOPED_NAME " << endl;
01451   if (scoped_name->identifier ()->accept (this) == -1)
01452     return -1;
01453 
01454   if (scoped_name->scoped_name () != 0)
01455     {
01456       Dump_Visitor body_visitor (this->depth_ + 1);
01457       if (scoped_name->scoped_name ()->accept (&body_visitor) == -1)
01458         return -1;
01459     }
01460   return 0;
01461 }
01462 
01463 int
01464 Dump_Visitor::visit_value (TAO_PSDL_Value *)
01465 {
01466   // @@ NOT YET SUPPORTED
01467   return 0;
01468 }
01469 
01470 int
01471 Dump_Visitor::visit_value_common_base (TAO_PSDL_Value_Common_Base *)
01472 {
01473   // @@ NOT YET SUPPORTED
01474   return 0;
01475 }
01476 
01477 int
01478 Dump_Visitor::visit_value_forward_dcl (TAO_PSDL_Value_Forward_Dcl *)
01479 {
01480   // @@ NOT YET SUPPORTED
01481   return 0;
01482 }
01483 
01484 int
01485 Dump_Visitor::visit_value_box_dcl (TAO_PSDL_Value_Box_Dcl *)
01486 {
01487   // @@ NOT YET SUPPORTED
01488   return 0;
01489 }
01490 
01491 int
01492 Dump_Visitor::visit_value_abs_dcl (TAO_PSDL_Value_Abs_Dcl *)
01493 {
01494   // @@ NOT YET SUPPORTED
01495   return 0;
01496 }
01497 
01498 int
01499 Dump_Visitor::visit_value_dcl (TAO_PSDL_Value_Dcl *)
01500 {
01501   // @@ NOT YET SUPPORTED
01502   return 0;
01503 }
01504 
01505 int
01506 Dump_Visitor::visit_value_header (TAO_PSDL_Value_Header *)
01507 {
01508   // @@ NOT YET SUPPORTED
01509   return 0;
01510 }
01511 
01512 int
01513 Dump_Visitor::visit_value_inheritance_spec (TAO_PSDL_Value_Inheritance_Spec *)
01514 {
01515   // @@ NOT YET SUPPORTED
01516   return 0;
01517 }
01518 
01519 int
01520 Dump_Visitor::visit_value_name (TAO_PSDL_Value_Name *)
01521 {
01522   // @@ NOT YET SUPPORTED
01523   return 0;
01524 }
01525 
01526 int
01527 Dump_Visitor::visit_value_element (TAO_PSDL_Value_Element *)
01528 {
01529   // @@ NOT YET SUPPORTED
01530   return 0;
01531 }
01532 
01533 int
01534 Dump_Visitor::visit_array_declarator (TAO_PSDL_Array_Declarator *)
01535 {
01536   // @@ NOT YET SUPPORTED
01537   return 0;
01538 }
01539 
01540 int
01541 Dump_Visitor::visit_fixed_array_size (TAO_PSDL_Fixed_Array_Size *)
01542 {
01543   // @@ NOT YET SUPPORTED
01544   return 0;
01545 }
01546 
01547 int
01548 Dump_Visitor::visit_enumerator (TAO_PSDL_Enumerator *enumerator)
01549 {
01550   print_depth (this->depth_ + 15);
01551 
01552   cout << "ENUMERATOR {" << endl;
01553   if (enumerator->identifier ()->accept (this) == -1)
01554     return -1;
01555 
01556   if (enumerator->enumerator () != 0)
01557     {
01558       Dump_Visitor body_visitor (this->depth_);
01559       if (enumerator->enumerator ()->accept (&body_visitor) == -1)
01560         return -1;
01561     }
01562   return 0;
01563 }
01564 
01565 int
01566 Dump_Visitor::visit_literal (TAO_PSDL_Literal *)
01567 {
01568   // @@ NOT YET SUPPORTED
01569   return 0;
01570 }
01571 
01572 int
01573 Dump_Visitor::visit_state_member (TAO_PSDL_State_Member *)
01574 {
01575   // @@ NOT YET SUPPORTED
01576   return 0;
01577 }
01578 
01579 int
01580 Dump_Visitor::visit_init_dcl (TAO_PSDL_Init_Dcl *)
01581 {
01582   // @@ NOT YET SUPPORTED
01583   return 0;
01584 }
01585 
01586 int
01587 Dump_Visitor::visit_init_param_decls (TAO_PSDL_Init_Param_Decls *)
01588 {
01589   // @@ NOT YET SUPPORTED
01590   return 0;
01591 }
01592 
01593 int
01594 Dump_Visitor::visit_init_param_decl (TAO_PSDL_Init_Param_Decl *)
01595 {
01596   // @@ NOT YET SUPPORTED
01597   return 0;
01598 }
01599 
01600 int
01601 Dump_Visitor::visit_factory_parameters (TAO_PSDL_Factory_Parameters *)
01602 {
01603   // @@ NOT YET SUPPORTED
01604   return 0;
01605 }
01606 
01607 int
01608 Dump_Visitor::visit_attr_dcl (TAO_PSDL_Attr_Dcl *attr_dcl)
01609 {
01610   print_depth (this->depth_);
01611 
01612   cout << "ATTR_DCL ";
01613 
01614   if (attr_dcl->readonly () != 0)
01615     {
01616       cout << "{" << attr_dcl->readonly () << "}" << endl;
01617     }
01618 
01619   if (attr_dcl->param_type_spec ()->accept (this) == -1)
01620     return -1;
01621 
01622   Dump_Visitor body_visitor (this->depth_ + 1);
01623 
01624   if (attr_dcl->simple_declarator ()->accept (&body_visitor) == -1)
01625     return -1;
01626 
01627   return 0;
01628 }
01629 
01630 int
01631 Dump_Visitor::visit_factory_dcl (TAO_PSDL_Factory_Dcl *)
01632 {
01633   // @@ NOT YET SUPPORTED
01634   return 0;
01635 }
01636 
01637 int
01638 Dump_Visitor::visit_positive_int_const (TAO_PSDL_Positive_Int_Const *)
01639 {
01640   // @@ NOT YET SUPPORTED
01641   return 0;
01642 }
01643 
01644 void
01645 Dump_Visitor::print_depth (int depth)
01646 {
01647   for (int i = 0; i != depth; ++i)
01648     {
01649       cout << " ";
01650     }
01651 }

Generated on Thu Nov 9 14:07:01 2006 for TAO_PSS by doxygen 1.3.6