2 //=============================================================================
6 * Generic visitor generating code for Module
8 * @author Aniruddha Gokhale
10 //=============================================================================
14 be_visitor_module::be_visitor_module (be_visitor_context
*ctx
)
15 : be_visitor_scope (ctx
)
19 be_visitor_module::~be_visitor_module (void)
24 be_visitor_module::visit_module (be_module
*node
)
26 if (node
->nmembers () == 0)
28 idl_global
->err ()->error1 (UTL_Error::EIDL_EMPTY_MODULE
,
32 if (this->visit_scope (node
) == -1)
34 ACE_ERROR_RETURN ((LM_ERROR
,
35 ACE_TEXT ("be_visitor_module::visit_module - ")
36 ACE_TEXT ("codegen for scope failed\n")),
44 be_visitor_module::visit_constant (be_constant
*node
)
46 // Instantiate a visitor context with a copy of our context. This info
47 // will be modified based on what type of node we are visiting.
48 be_visitor_context
ctx (*this->ctx_
);
52 switch (this->ctx_
->state ())
54 case TAO_CodeGen::TAO_ROOT_CH
:
56 be_visitor_constant_ch
visitor (&ctx
);
57 status
= node
->accept (&visitor
);
60 case TAO_CodeGen::TAO_ROOT_CS
:
62 be_visitor_constant_cs
visitor (&ctx
);
63 status
= node
->accept (&visitor
);
67 return 0; // nothing to be done
72 ACE_ERROR_RETURN ((LM_ERROR
,
73 ACE_TEXT ("be_visitor_module::")
74 ACE_TEXT ("visit_constant - ")
75 ACE_TEXT ("failed to accept visitor\n")),
83 be_visitor_module::visit_native (be_native
*node
)
85 // Instantiate a visitor context with a copy of our context. This info
86 // will be modified based on what type of node we are visiting
87 be_visitor_context
ctx (*this->ctx_
);
91 switch (this->ctx_
->state ())
93 case TAO_CodeGen::TAO_ROOT_CH
:
95 be_visitor_native_ch
visitor (&ctx
);
96 status
= node
->accept (&visitor
);
100 return 0; // nothing to be done
105 ACE_ERROR_RETURN ((LM_ERROR
,
106 ACE_TEXT ("be_visitor_module::::")
107 ACE_TEXT ("visit_native - ")
108 ACE_TEXT ("failed to accept visitor\n")),
116 be_visitor_module::visit_enum (be_enum
*node
)
118 // Instantiate a visitor context with a copy of our context. This info
119 // will be modified based on what type of node we are visiting.
120 be_visitor_context
ctx (*this->ctx_
);
124 switch (this->ctx_
->state ())
126 case TAO_CodeGen::TAO_ROOT_CH
:
128 be_visitor_enum_ch
visitor (&ctx
);
129 status
= node
->accept (&visitor
);
132 case TAO_CodeGen::TAO_ROOT_CS
:
134 be_visitor_enum_cs
visitor (&ctx
);
135 status
= node
->accept (&visitor
);
138 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
140 be_visitor_enum_any_op_ch
visitor (&ctx
);
141 status
= node
->accept (&visitor
);
144 case TAO_CodeGen::TAO_ROOT_ANY_OP_CS
:
146 be_visitor_enum_any_op_cs
visitor (&ctx
);
147 status
= node
->accept (&visitor
);
150 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
152 be_visitor_enum_cdr_op_ch
visitor (&ctx
);
153 status
= node
->accept (&visitor
);
156 case TAO_CodeGen::TAO_ROOT_CDR_OP_CS
:
158 be_visitor_enum_cdr_op_cs
visitor (&ctx
);
159 status
= node
->accept (&visitor
);
163 return 0; // nothing to be done
168 ACE_ERROR_RETURN ((LM_ERROR
,
169 ACE_TEXT ("be_visitor_module::")
170 ACE_TEXT ("visit_enum - ")
171 ACE_TEXT ("failed to accept visitor\n")),
179 be_visitor_module::visit_exception (be_exception
*node
)
181 // Instantiate a visitor context with a copy of our context. This info
182 // will be modified based on what type of node we are visiting.
183 be_visitor_context
ctx (*this->ctx_
);
187 switch (this->ctx_
->state ())
189 case TAO_CodeGen::TAO_ROOT_CH
:
191 be_visitor_exception_ch
visitor (&ctx
);
192 status
= node
->accept (&visitor
);
195 case TAO_CodeGen::TAO_ROOT_CI
:
197 be_visitor_exception_ci
visitor (&ctx
);
198 status
= node
->accept (&visitor
);
201 case TAO_CodeGen::TAO_ROOT_CS
:
203 be_visitor_exception_cs
visitor (&ctx
);
204 status
= node
->accept (&visitor
);
207 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
209 be_visitor_exception_any_op_ch
visitor (&ctx
);
210 status
= node
->accept (&visitor
);
213 case TAO_CodeGen::TAO_ROOT_ANY_OP_CS
:
215 be_visitor_exception_any_op_cs
visitor (&ctx
);
216 status
= node
->accept (&visitor
);
219 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
221 be_visitor_exception_cdr_op_ch
visitor (&ctx
);
222 status
= node
->accept (&visitor
);
225 case TAO_CodeGen::TAO_ROOT_CDR_OP_CS
:
227 be_visitor_exception_cdr_op_cs
visitor (&ctx
);
228 status
= node
->accept (&visitor
);
232 return 0; // nothing to be done
237 ACE_ERROR_RETURN ((LM_ERROR
,
238 ACE_TEXT ("be_visitor_module::")
239 ACE_TEXT ("visit_exception - ")
240 ACE_TEXT ("failed to accept visitor\n")),
248 be_visitor_module::visit_interface (be_interface
*node
)
250 be_visitor_context
ctx (*this->ctx_
);
254 switch (this->ctx_
->state ())
256 case TAO_CodeGen::TAO_ROOT_CH
:
258 ctx
.state (TAO_CodeGen::TAO_INTERFACE_CH
);
259 be_visitor_interface_ch
visitor (&ctx
);
260 status
= node
->accept (&visitor
);
263 case TAO_CodeGen::TAO_ROOT_CI
:
265 be_visitor_interface_ci
visitor (&ctx
);
266 status
= node
->accept (&visitor
);
269 case TAO_CodeGen::TAO_ROOT_CS
:
271 be_visitor_interface_cs
visitor (&ctx
);
272 status
= node
->accept (&visitor
);
275 case TAO_CodeGen::TAO_ROOT_SH
:
277 be_visitor_interface_sh
visitor (&ctx
);
278 status
= node
->accept (&visitor
);
281 case TAO_CodeGen::TAO_ROOT_IH
:
283 be_visitor_interface_ih
visitor (&ctx
);
284 status
= node
->accept (&visitor
);
287 case TAO_CodeGen::TAO_ROOT_SS
:
289 be_visitor_interface_ss
visitor (&ctx
);
290 status
= node
->accept (&visitor
);
293 case TAO_CodeGen::TAO_ROOT_IS
:
295 be_visitor_interface_is
visitor (&ctx
);
296 status
= node
->accept (&visitor
);
299 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
301 be_visitor_interface_any_op_ch
visitor (&ctx
);
302 status
= node
->accept (&visitor
);
305 case TAO_CodeGen::TAO_ROOT_ANY_OP_CS
:
307 be_visitor_interface_any_op_cs
visitor (&ctx
);
308 status
= node
->accept (&visitor
);
311 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
313 be_visitor_interface_cdr_op_ch
visitor (&ctx
);
314 status
= node
->accept (&visitor
);
317 case TAO_CodeGen::TAO_ROOT_CDR_OP_CS
:
319 be_visitor_interface_cdr_op_cs
visitor (&ctx
);
320 status
= node
->accept (&visitor
);
323 case TAO_CodeGen::TAO_ROOT_EX_IDL
:
325 be_visitor_interface_ex_idl
visitor (&ctx
);
326 status
= node
->accept (&visitor
);
329 case TAO_CodeGen::TAO_ROOT_SVTH
:
331 be_visitor_interface_svth
visitor (&ctx
);
332 status
= node
->accept (&visitor
);
335 case TAO_CodeGen::TAO_ROOT_SVTS
:
337 be_visitor_interface_svts
visitor (&ctx
);
338 status
= node
->accept (&visitor
);
341 case TAO_CodeGen::TAO_ROOT_SVH
:
342 case TAO_CodeGen::TAO_ROOT_SVS
:
343 case TAO_CodeGen::TAO_ROOT_EXH
:
344 case TAO_CodeGen::TAO_ROOT_EXS
:
345 case TAO_CodeGen::TAO_ROOT_CNH
:
346 case TAO_CodeGen::TAO_ROOT_CNS
:
348 // Nothing to be done for these cases.
354 ACE_ERROR_RETURN ((LM_ERROR
,
355 ACE_TEXT ("be_visitor_module::")
356 ACE_TEXT ("visit_interface - ")
357 ACE_TEXT ("Bad context state\n")),
366 else if (status
== -1)
368 ACE_ERROR_RETURN ((LM_ERROR
,
369 ACE_TEXT ("be_visitor_module::")
370 ACE_TEXT ("visit_interface - ")
371 ACE_TEXT ("failed to accept visitor\n")),
375 ctx
.state (TAO_CodeGen::TAO_ROOT_CH
);
380 be_visitor_module::visit_interface_fwd (be_interface_fwd
*node
)
382 // Instantiate a visitor context with a copy of our context. This info
383 // will be modified based on what type of node we are visiting.
384 be_visitor_context
ctx (*this->ctx_
);
388 switch (this->ctx_
->state ())
390 case TAO_CodeGen::TAO_ROOT_CH
:
392 be_visitor_interface_fwd_ch
visitor (&ctx
);
393 status
= node
->accept (&visitor
);
396 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
398 be_visitor_interface_fwd_any_op_ch
visitor (&ctx
);
399 status
= node
->accept (&visitor
);
402 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
404 be_visitor_interface_fwd_cdr_op_ch
visitor (&ctx
);
405 status
= node
->accept (&visitor
);
409 return 0; // nothing to be done
414 ACE_ERROR_RETURN ((LM_ERROR
,
415 ACE_TEXT ("be_visitor_module::")
416 ACE_TEXT ("visit_interface_fwd - ")
417 ACE_TEXT ("failed to accept visitor\n")),
425 be_visitor_module::visit_valuebox (be_valuebox
*node
)
427 // Instantiate a visitor context with a copy of our context. This info
428 // will be modified based on what type of node we are visiting.
429 be_visitor_context
ctx (*this->ctx_
);
433 switch (this->ctx_
->state ())
435 case TAO_CodeGen::TAO_ROOT_CH
:
437 be_visitor_valuebox_ch
visitor (&ctx
);
438 status
= node
->accept (&visitor
);
441 case TAO_CodeGen::TAO_ROOT_CI
:
443 be_visitor_valuebox_ci
visitor (&ctx
);
444 status
= node
->accept (&visitor
);
447 case TAO_CodeGen::TAO_ROOT_CS
:
449 be_visitor_valuebox_cs
visitor (&ctx
);
450 status
= node
->accept (&visitor
);
453 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
455 be_visitor_valuebox_cdr_op_ch
visitor (&ctx
);
456 status
= node
->accept (&visitor
);
459 case TAO_CodeGen::TAO_ROOT_CDR_OP_CS
:
461 be_visitor_valuebox_cdr_op_cs
visitor (&ctx
);
462 status
= node
->accept (&visitor
);
465 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
467 be_visitor_valuebox_any_op_ch
visitor (&ctx
);
468 status
= node
->accept (&visitor
);
471 case TAO_CodeGen::TAO_ROOT_ANY_OP_CS
:
473 be_visitor_valuebox_any_op_cs
visitor (&ctx
);
474 status
= node
->accept (&visitor
);
477 case TAO_CodeGen::TAO_ROOT_SH
:
478 case TAO_CodeGen::TAO_ROOT_SS
:
483 return 0; // nothing to do.
488 ACE_ERROR_RETURN ((LM_ERROR
,
489 ACE_TEXT ("be_visitor_module::")
490 ACE_TEXT ("visit_valuebox - ")
491 ACE_TEXT ("failed to accept visitor\n")),
499 be_visitor_module::visit_valuetype (be_valuetype
*node
)
501 // Instantiate a visitor context with a copy of our context. This info
502 // will be modified based on what type of node we are visiting
503 be_visitor_context
ctx (*this->ctx_
);
507 switch (this->ctx_
->state ())
509 case TAO_CodeGen::TAO_ROOT_CH
:
511 be_visitor_valuetype_ch
visitor (&ctx
);
512 status
= node
->accept (&visitor
);
515 case TAO_CodeGen::TAO_ROOT_CI
:
517 be_visitor_valuetype_ci
visitor (&ctx
);
518 status
= node
->accept (&visitor
);
521 case TAO_CodeGen::TAO_ROOT_CS
:
523 be_visitor_valuetype_cs
visitor (&ctx
);
524 status
= node
->accept (&visitor
);
527 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
529 be_visitor_valuetype_cdr_op_ch
visitor (&ctx
);
530 status
= node
->accept (&visitor
);
533 case TAO_CodeGen::TAO_ROOT_CDR_OP_CS
:
535 be_visitor_valuetype_cdr_op_cs
visitor (&ctx
);
536 status
= node
->accept (&visitor
);
539 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
541 be_visitor_valuetype_any_op_ch
visitor (&ctx
);
542 status
= node
->accept (&visitor
);
545 case TAO_CodeGen::TAO_ROOT_ANY_OP_CS
:
547 be_visitor_valuetype_any_op_cs
visitor (&ctx
);
548 status
= node
->accept (&visitor
);
551 case TAO_CodeGen::TAO_ROOT_SH
:
553 be_visitor_valuetype_sh
visitor (&ctx
);
554 status
= node
->accept (&visitor
);
557 case TAO_CodeGen::TAO_ROOT_SS
:
559 be_visitor_valuetype_ss
visitor (&ctx
);
560 status
= node
->accept (&visitor
);
564 return 0; // nothing to do.
569 ACE_ERROR_RETURN ((LM_ERROR
,
570 ACE_TEXT ("be_visitor_module::")
571 ACE_TEXT ("visit_valuetype - ")
572 ACE_TEXT ("failed to accept visitor\n")),
580 be_visitor_module::visit_valuetype_fwd (be_valuetype_fwd
*node
)
582 // Instantiate a visitor context with a copy of our context. This info
583 // will be modified based on what type of node we are visiting.
584 be_visitor_context
ctx (*this->ctx_
);
588 switch (this->ctx_
->state ())
590 case TAO_CodeGen::TAO_ROOT_CH
:
592 be_visitor_valuetype_fwd_ch
visitor (&ctx
);
593 status
= node
->accept (&visitor
);
596 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
598 be_visitor_valuetype_fwd_any_op_ch
visitor (&ctx
);
599 status
= node
->accept (&visitor
);
602 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
604 be_visitor_valuetype_fwd_cdr_op_ch
visitor (&ctx
);
605 status
= node
->accept (&visitor
);
609 return 0; // nothing to be done
614 ACE_ERROR_RETURN ((LM_ERROR
,
615 ACE_TEXT ("be_visitor_module::")
616 ACE_TEXT ("visit_valuetype_fwd - ")
617 ACE_TEXT ("failed to accept visitor\n")),
625 be_visitor_module::visit_eventtype (be_eventtype
*node
)
627 return this->visit_valuetype (node
);
631 be_visitor_module::visit_eventtype_fwd (be_eventtype_fwd
*node
)
633 return this->visit_valuetype_fwd (node
);
637 be_visitor_module::visit_component (be_component
*node
)
639 // Instantiate a visitor context with a copy of our context. This info
640 // will be modified based on what type of node we are visiting
641 be_visitor_context
ctx (*this->ctx_
);
645 switch (this->ctx_
->state ())
647 // These cases all behave like interfaces.
648 case TAO_CodeGen::TAO_ROOT_CH
:
649 case TAO_CodeGen::TAO_ROOT_CI
:
650 case TAO_CodeGen::TAO_ROOT_CS
:
651 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
652 case TAO_CodeGen::TAO_ROOT_CDR_OP_CS
:
653 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
654 case TAO_CodeGen::TAO_ROOT_ANY_OP_CS
:
655 case TAO_CodeGen::TAO_ROOT_SH
:
656 case TAO_CodeGen::TAO_ROOT_SS
:
657 return this->visit_interface (node
);
659 // Nothing for these with components.
660 case TAO_CodeGen::TAO_ROOT_IH
:
661 case TAO_CodeGen::TAO_ROOT_IS
:
662 case TAO_CodeGen::TAO_ROOT_CNH
:
663 case TAO_CodeGen::TAO_ROOT_CNS
:
665 case TAO_CodeGen::TAO_ROOT_SVTH
:
667 be_visitor_component_svth
visitor (&ctx
);
668 status
= node
->accept (&visitor
);
671 case TAO_CodeGen::TAO_ROOT_SVTS
:
673 be_visitor_component_svts
visitor (&ctx
);
674 status
= node
->accept (&visitor
);
677 case TAO_CodeGen::TAO_ROOT_SVH
:
679 be_visitor_component_svh
visitor (&ctx
);
680 status
= node
->accept (&visitor
);
683 case TAO_CodeGen::TAO_ROOT_SVS
:
685 be_visitor_component_svs
visitor (&ctx
);
686 status
= node
->accept (&visitor
);
689 case TAO_CodeGen::TAO_ROOT_EXH
:
691 be_visitor_component_exh
visitor (&ctx
);
692 status
= node
->accept (&visitor
);
695 case TAO_CodeGen::TAO_ROOT_EXS
:
697 be_visitor_component_exs
visitor (&ctx
);
698 status
= node
->accept (&visitor
);
701 case TAO_CodeGen::TAO_ROOT_EX_IDL
:
703 be_visitor_component_ex_idl
visitor (&ctx
);
704 status
= node
->accept (&visitor
);
709 ACE_ERROR_RETURN ((LM_ERROR
,
710 ACE_TEXT ("be_visitor_module::")
711 ACE_TEXT ("visit_component - ")
712 ACE_TEXT ("Bad context state\n")),
719 ACE_ERROR_RETURN ((LM_ERROR
,
720 ACE_TEXT ("be_visitor_module::")
721 ACE_TEXT ("visit_component - ")
722 ACE_TEXT ("failed to accept visitor\n")),
730 be_visitor_module::visit_component_fwd (be_component_fwd
*node
)
732 // Instantiate a visitor context with a copy of our context. This info
733 // will be modified based on what type of node we are visiting.
734 be_visitor_context
ctx (*this->ctx_
);
738 switch (this->ctx_
->state ())
740 case TAO_CodeGen::TAO_ROOT_CH
:
742 be_visitor_component_fwd_ch
visitor (&ctx
);
743 status
= node
->accept (&visitor
);
746 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
748 be_visitor_component_fwd_any_op_ch
visitor (&ctx
);
749 status
= node
->accept (&visitor
);
752 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
754 be_visitor_component_fwd_cdr_op_ch
visitor (&ctx
);
755 status
= node
->accept (&visitor
);
759 return 0; // nothing to be done
764 ACE_ERROR_RETURN ((LM_ERROR
,
765 ACE_TEXT ("be_visitor_module::")
766 ACE_TEXT ("visit_component_fwd - ")
767 ACE_TEXT ("failed to accept visitor\n")),
775 be_visitor_module::visit_home (be_home
*node
)
777 // Instantiate a visitor context with a copy of our context. This info
778 // will be modified based on what type of node we are visiting.
779 be_visitor_context
ctx (*this->ctx_
);
783 switch (this->ctx_
->state ())
785 case TAO_CodeGen::TAO_ROOT_SVH
:
787 be_visitor_home_svh
visitor (&ctx
);
788 status
= node
->accept (&visitor
);
791 case TAO_CodeGen::TAO_ROOT_SVS
:
793 be_visitor_home_svs
visitor (&ctx
);
794 status
= node
->accept (&visitor
);
797 case TAO_CodeGen::TAO_ROOT_EX_IDL
:
799 be_visitor_home_ex_idl
visitor (&ctx
);
800 status
= node
->accept (&visitor
);
803 case TAO_CodeGen::TAO_ROOT_EXH
:
805 be_visitor_home_exh
visitor (&ctx
);
806 status
= node
->accept (&visitor
);
809 case TAO_CodeGen::TAO_ROOT_EXS
:
811 be_visitor_home_exs
visitor (&ctx
);
812 status
= node
->accept (&visitor
);
816 return 0; // nothing to be done
821 ACE_ERROR_RETURN ((LM_ERROR
,
822 ACE_TEXT ("be_visitor_module::")
823 ACE_TEXT ("visit_home - ")
824 ACE_TEXT ("failed to accept visitor\n")),
832 be_visitor_module::visit_connector (be_connector
*node
)
834 // Instantiate a visitor context with a copy of our context. This info
835 // will be modified based on what type of node we are visiting.
836 be_visitor_context
ctx (*this->ctx_
);
840 switch (this->ctx_
->state ())
842 case TAO_CodeGen::TAO_ROOT_CNH
:
844 if (node
->ami_connector ())
846 be_visitor_connector_ami_exh
visitor (&ctx
);
847 status
= node
->accept (&visitor
);
849 else if (node
->dds_connector ())
851 be_visitor_connector_dds_exh
visitor (&ctx
);
852 status
= node
->accept (&visitor
);
856 case TAO_CodeGen::TAO_ROOT_CNS
:
858 if (node
->ami_connector ())
860 be_visitor_connector_ami_exs
visitor (&ctx
);
861 status
= node
->accept (&visitor
);
863 else if (node
->dds_connector ())
865 be_visitor_connector_dds_exs
visitor (&ctx
);
866 status
= node
->accept (&visitor
);
870 // Skip these contexts, the connector impl is
871 // generated in a separate pass, using the context states
873 case TAO_CodeGen::TAO_ROOT_EXH
:
874 case TAO_CodeGen::TAO_ROOT_EXS
:
877 // In all other cases, same as component.
878 return this->visit_component (node
);
883 ACE_ERROR_RETURN ((LM_ERROR
,
884 ACE_TEXT ("be_visitor_module::")
885 ACE_TEXT ("visit_connector - ")
886 ACE_TEXT ("failed to accept visitor\n")),
894 be_visitor_module::visit_structure (be_structure
*node
)
896 // Instantiate a visitor context with a copy of our context. This info
897 // will be modified based on what type of node we are visiting.
898 be_visitor_context
ctx (*this->ctx_
);
902 switch (this->ctx_
->state ())
904 case TAO_CodeGen::TAO_ROOT_CH
:
906 be_visitor_structure_ch
visitor (&ctx
);
907 status
= node
->accept (&visitor
);
910 case TAO_CodeGen::TAO_ROOT_CI
:
912 be_visitor_structure_ci
visitor (&ctx
);
913 status
= node
->accept (&visitor
);
916 case TAO_CodeGen::TAO_ROOT_CS
:
918 be_visitor_structure_cs
visitor (&ctx
);
919 status
= node
->accept (&visitor
);
922 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
924 be_visitor_structure_any_op_ch
visitor (&ctx
);
925 status
= node
->accept (&visitor
);
928 case TAO_CodeGen::TAO_ROOT_ANY_OP_CS
:
930 be_visitor_structure_any_op_cs
visitor (&ctx
);
931 status
= node
->accept (&visitor
);
934 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
936 be_visitor_structure_cdr_op_ch
visitor (&ctx
);
937 status
= node
->accept (&visitor
);
940 case TAO_CodeGen::TAO_ROOT_CDR_OP_CS
:
942 be_visitor_structure_cdr_op_cs
visitor (&ctx
);
943 status
= node
->accept (&visitor
);
947 return 0; // nothing to be done
952 ACE_ERROR_RETURN ((LM_ERROR
,
953 ACE_TEXT ("be_visitor_module::")
954 ACE_TEXT ("visit_structure - ")
955 ACE_TEXT ("failed to accept visitor\n")),
963 be_visitor_module::visit_structure_fwd (be_structure_fwd
*node
)
965 // Instantiate a visitor context with a copy of our context. This info
966 // will be modified based on what type of node we are visiting.
967 be_visitor_context
ctx (*this->ctx_
);
971 switch (this->ctx_
->state ())
973 case TAO_CodeGen::TAO_ROOT_CH
:
975 be_visitor_structure_fwd_ch
visitor (&ctx
);
976 status
= node
->accept (&visitor
);
980 return 0; // nothing to be done
985 ACE_ERROR_RETURN ((LM_ERROR
,
986 ACE_TEXT ("be_visitor_module::")
987 ACE_TEXT ("visit_structure_fwd - ")
988 ACE_TEXT ("failed to accept visitor\n")),
996 be_visitor_module::visit_union (be_union
*node
)
998 // Instantiate a visitor context with a copy of our context. This info
999 // will be modified based on what type of node we are visiting.
1000 be_visitor_context
ctx (*this->ctx_
);
1004 switch (this->ctx_
->state ())
1006 case TAO_CodeGen::TAO_ROOT_CH
:
1008 be_visitor_union_ch
visitor (&ctx
);
1009 status
= node
->accept (&visitor
);
1012 case TAO_CodeGen::TAO_ROOT_CI
:
1014 be_visitor_union_ci
visitor (&ctx
);
1015 status
= node
->accept (&visitor
);
1018 case TAO_CodeGen::TAO_ROOT_CS
:
1020 be_visitor_union_cs
visitor (&ctx
);
1021 status
= node
->accept (&visitor
);
1024 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
1026 be_visitor_union_any_op_ch
visitor (&ctx
);
1027 status
= node
->accept (&visitor
);
1030 case TAO_CodeGen::TAO_ROOT_ANY_OP_CS
:
1032 be_visitor_union_any_op_cs
visitor (&ctx
);
1033 status
= node
->accept (&visitor
);
1036 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
1038 be_visitor_union_cdr_op_ch
visitor (&ctx
);
1039 status
= node
->accept (&visitor
);
1042 case TAO_CodeGen::TAO_ROOT_CDR_OP_CS
:
1044 be_visitor_union_cdr_op_cs
visitor (&ctx
);
1045 status
= node
->accept (&visitor
);
1049 return 0; // nothing to be done
1054 ACE_ERROR_RETURN ((LM_ERROR
,
1055 ACE_TEXT ("be_visitor_module::")
1056 ACE_TEXT ("visit_union - ")
1057 ACE_TEXT ("failed to accept visitor\n")),
1065 be_visitor_module::visit_union_fwd (be_union_fwd
*node
)
1067 // Instantiate a visitor context with a copy of our context. This info
1068 // will be modified based on what type of node we are visiting.
1069 be_visitor_context
ctx (*this->ctx_
);
1073 switch (this->ctx_
->state ())
1075 case TAO_CodeGen::TAO_ROOT_CH
:
1077 be_visitor_union_fwd_ch
visitor (&ctx
);
1078 status
= node
->accept (&visitor
);
1082 return 0; // nothing to be done
1087 ACE_ERROR_RETURN ((LM_ERROR
,
1088 ACE_TEXT ("be_visitor_module::")
1089 ACE_TEXT ("visit_union_fwd - ")
1090 ACE_TEXT ("failed to accept visitor\n")),
1098 be_visitor_module::visit_typedef (be_typedef
*node
)
1100 // Instantiate a visitor context with a copy of our context. This info
1101 // will be modified based on what type of node we are visiting.
1102 be_visitor_context
ctx (*this->ctx_
);
1106 switch (this->ctx_
->state ())
1108 case TAO_CodeGen::TAO_ROOT_CH
:
1110 be_visitor_typedef_ch
visitor (&ctx
);
1111 status
= node
->accept (&visitor
);
1114 case TAO_CodeGen::TAO_ROOT_CI
:
1116 be_visitor_typedef_ci
visitor (&ctx
);
1117 status
= node
->accept (&visitor
);
1120 case TAO_CodeGen::TAO_ROOT_CS
:
1122 be_visitor_typedef_cs
visitor (&ctx
);
1123 status
= node
->accept (&visitor
);
1126 case TAO_CodeGen::TAO_ROOT_ANY_OP_CH
:
1128 be_visitor_typedef_any_op_ch
visitor (&ctx
);
1129 status
= node
->accept (&visitor
);
1132 case TAO_CodeGen::TAO_ROOT_ANY_OP_CS
:
1134 be_visitor_typedef_any_op_cs
visitor (&ctx
);
1135 status
= node
->accept (&visitor
);
1138 case TAO_CodeGen::TAO_ROOT_CDR_OP_CH
:
1140 be_visitor_typedef_cdr_op_ch
visitor (&ctx
);
1141 status
= node
->accept (&visitor
);
1144 case TAO_CodeGen::TAO_ROOT_CDR_OP_CS
:
1146 be_visitor_typedef_cdr_op_cs
visitor (&ctx
);
1147 status
= node
->accept (&visitor
);
1151 return 0; // nothing to be done
1156 ACE_ERROR_RETURN ((LM_ERROR
,
1157 ACE_TEXT ("be_visitor_module::")
1158 ACE_TEXT ("visit_typedef - ")
1159 ACE_TEXT ("failed to accept visitor\n")),