2 //=============================================================================
4 * @file valuebox_ci.cpp
6 * Visitor generating code for valueboxes in the client inline file
10 //=============================================================================
14 be_visitor_valuebox_ci::be_visitor_valuebox_ci (be_visitor_context
*ctx
)
15 : be_visitor_valuebox (ctx
)
19 be_visitor_valuebox_ci::~be_visitor_valuebox_ci (void)
24 be_visitor_valuebox_ci::visit_valuebox (be_valuebox
*node
)
26 // Nothing to do if we are imported or code is already generated.
27 if (node
->imported () || node
->cli_inline_gen ())
32 TAO_OutStream
*os
= this->ctx_
->stream ();
34 this->ctx_
->node (node
); // save the node
36 be_type
*bt
= dynamic_cast<be_type
*> (node
->boxed_type ());
38 // Emit the type specific elements. The visit_* methods in this
39 // module do that work.
40 if (!bt
|| (bt
->accept (this) == -1))
42 ACE_ERROR_RETURN ((LM_ERROR
,
43 " (%N:%l) be_visitor_valuebox_ci::visit_valuebox - "
44 "type-specific valuebox code generation failed\n"),
48 TAO_INSERT_COMMENT (os
);
50 *os
<< "ACE_INLINE const char*" << be_nl
51 << node
->name () << "::_tao_obv_static_repository_id ()" << be_nl
53 << "return \"" << node
->repoID () << "\";" << be_uidt_nl
56 // Indicate that code is already generated for this node.
57 node
->cli_inline_gen (true);
63 be_visitor_valuebox_ci::visit_array (be_array
*node
)
65 TAO_OutStream
*os
= this->ctx_
->stream ();
67 // Retrieve the node being visited by this be_visitor_valuebox_ch.
68 be_decl
* vb_node
= this->ctx_
->node ();
70 TAO_INSERT_COMMENT (os
);
72 // Public default constructor
73 *os
<< "ACE_INLINE" << be_nl
74 << vb_node
->name () << "::" << vb_node
->local_name () << " (void)"
75 << be_nl
<< "{" << be_idt_nl
76 << "this->_pd_value = " << node
->full_name () << "_alloc ();"
77 << be_uidt_nl
<< "}" << be_nl_2
;
79 // Public constructor that takes a const array argument
80 *os
<< "ACE_INLINE" << be_nl
81 << vb_node
->name () << "::" << vb_node
->local_name () << " (const "
82 << node
->full_name () << " val)" << be_nl
84 << "this->_pd_value = " << node
->full_name () << "_dup (val);"
88 // Public copy constructor
89 *os
<< "ACE_INLINE" << be_nl
90 << vb_node
->name () << "::" << vb_node
->local_name () << " (const "
91 << vb_node
->local_name () << "& val)" << be_idt_nl
92 << ": ::CORBA::ValueBase (val)," << be_nl
93 << " ::CORBA::DefaultValueRefCountBase (val)"
96 << "this->_pd_value = " << node
->full_name ()
97 << "_dup (val._pd_value.in ());" << be_uidt_nl
100 // Public assignment operator that takes a const array argument
101 *os
<< "ACE_INLINE " << vb_node
->name () << " &" << be_nl
102 << vb_node
->name () << "::operator= (const "
103 << node
->full_name () << " val)" << be_nl
105 << "this->_pd_value = " << node
->full_name ()
106 << "_dup (val);" << be_nl
107 << "return *this;" << be_uidt_nl
110 // Public accessor and modifier methods
111 *os
<< "ACE_INLINE const " << node
->full_name () << "_slice*" << be_nl
112 << vb_node
->name () << "::_value (void) const" << be_nl
114 << "return this->_pd_value.in ();" << be_uidt_nl
117 *os
<< "ACE_INLINE " << node
->full_name () << "_slice*" << be_nl
118 << vb_node
->name () << "::_value (void)" << be_nl
120 << "return this->_pd_value.inout ();" << be_uidt_nl
123 *os
<< "ACE_INLINE void" << be_nl
124 << vb_node
->name () << "::_value (const " << node
->full_name ()
127 << "this->_pd_value = " << node
->full_name () << "_dup (val);"
131 // Overloaded subscript operators
132 *os
<< "ACE_INLINE const " << node
->full_name () << "_slice &" << be_nl
133 << vb_node
->name () << "::operator[] ( ::CORBA::ULong index) const"
136 << "return this->_pd_value[index];" << be_uidt_nl
139 *os
<< "ACE_INLINE "<< node
->full_name () << "_slice &" << be_nl
140 << vb_node
->name () << "::operator[] ( ::CORBA::ULong index)" << be_nl
142 << "return this->_pd_value[index];" << be_uidt_nl
145 // Explicit conversion functions
146 *os
<< "ACE_INLINE const " << node
->full_name () << "_slice *" << be_nl
147 << vb_node
->name () << "::_boxed_in (void) const" << be_nl
149 << "return this->_pd_value.in ();" << be_uidt_nl
152 *os
<< "ACE_INLINE " << node
->full_name () << "_slice *" << be_nl
153 << vb_node
->name () << "::_boxed_inout (void)" << be_nl
155 << "return this->_pd_value.inout ();" << be_uidt_nl
158 *os
<< "ACE_INLINE " << node
->full_name () << "_slice *" << be_nl
159 << vb_node
->name () << "::_boxed_out (void)" << be_nl
161 << "return this->_pd_value.out ();" << be_uidt_nl
168 be_visitor_valuebox_ci::visit_enum (be_enum
*node
)
170 return this->emit_for_predef_enum (node
, "", false);
174 be_visitor_valuebox_ci::visit_interface (be_interface
*node
)
176 return this->emit_for_predef_enum (node
, "_ptr", false);
180 be_visitor_valuebox_ci::visit_predefined_type (be_predefined_type
*node
)
186 case AST_PredefinedType::PT_boolean
:
189 case AST_PredefinedType::PT_char
:
192 case AST_PredefinedType::PT_wchar
:
195 case AST_PredefinedType::PT_octet
:
198 case AST_PredefinedType::PT_any
:
206 return this->emit_for_predef_enum (node
, "", is_any
);
210 be_visitor_valuebox_ci::visit_sequence (be_sequence
*node
)
212 TAO_OutStream
*os
= this->ctx_
->stream ();
214 // Retrieve the node being visited by this be_visitor_valuebox_ch.
215 be_decl
* vb_node
= this->ctx_
->node ();
217 TAO_INSERT_COMMENT (os
);
219 this->emit_default_constructor_alloc (node
);
220 this->emit_constructor_one_arg_alloc (node
);
221 this->emit_copy_constructor_alloc (node
);
222 this->emit_assignment_alloc (node
);
223 this->emit_accessor_modifier (node
);
224 this->emit_boxed_access(node
, "*");
226 // Generate maximum() accessor
227 *os
<< "ACE_INLINE ::CORBA::ULong" << be_nl
228 << vb_node
->name () << "::maximum (void) const" << be_nl
230 << "return this->_pd_value->maximum ();" << be_uidt_nl
233 // Generate length() accessor
234 *os
<< "ACE_INLINE ::CORBA::ULong" << be_nl
235 << vb_node
->name () << "::length (void) const" << be_nl
237 << "return this->_pd_value->length ();" << be_uidt_nl
240 // Generate length() setter
241 *os
<< "ACE_INLINE void" << be_nl
242 << vb_node
->name () << "::length ( ::CORBA::ULong length)" << be_nl
244 << "this->_pd_value->length (length);" << be_uidt_nl
251 be_visitor_valuebox_ci::visit_string (be_string
*node
)
253 TAO_OutStream
*os
= this->ctx_
->stream ();
255 const char *string_type
;
256 const char *char_type
;
257 if (node
->node_type () == AST_Decl::NT_string
)
259 string_type
= "String";
260 char_type
= "::CORBA::Char";
262 else if (node
->node_type () == AST_Decl::NT_wstring
)
264 string_type
= "WString";
265 char_type
= "::CORBA::WChar";
269 ACE_ERROR ((LM_ERROR
,
270 "(%N:%l) be_visitor_valuebox_ci::visit_string -"
271 "unexpected string node type=%d\n", node
->node_type ()));
275 // Retrieve the node being visited by this be_visitor_valuebox_ch.
276 be_decl
* vb_node
= this->ctx_
->node ();
278 TAO_INSERT_COMMENT (os
);
280 this->emit_default_constructor ();
281 this->emit_constructor_one_arg (node
, "");
282 this->emit_copy_constructor ();
283 this->emit_assignment (node
, "");
285 // Public constructor with one const argument of underlying type
286 *os
<< "ACE_INLINE" << be_nl
287 << vb_node
->name () << "::" << vb_node
->local_name () << " (const "
288 << node
->full_name () << " val)" << be_nl
290 << "this->_pd_value = val;" << be_uidt_nl
294 // Public constructor with one argument of type const CORBA::String_var&
295 *os
<< "ACE_INLINE" << be_nl
296 << vb_node
->name () << "::" << vb_node
->local_name ()
297 << " (const ::CORBA::" << string_type
<< "_var& var)" << be_nl
299 << "this->_pd_value = var;" << be_uidt_nl
302 // Public assignment operator with one argument of type const char *
303 *os
<< "ACE_INLINE " << vb_node
->name () << " &" << be_nl
304 << vb_node
->name () << "::operator= (const "
305 << node
->full_name () << " val)" << be_nl
307 << "this->_pd_value = val;" << be_nl
308 << "return *this;" << be_uidt_nl
311 // Public assignment operator with one argument of type
312 // const CORBA::String_var&
313 *os
<< "ACE_INLINE " << vb_node
->name () << " &" << be_nl
314 << vb_node
->name () << "::operator= (const ::CORBA::"
315 << string_type
<< "_var& var)"
318 << "this->_pd_value = var;" << be_nl
319 << "return *this;" << be_uidt_nl
322 // Accessor function takes no arguments and returns a const char *
323 *os
<< "ACE_INLINE const " << node
->full_name () << be_nl
324 << vb_node
->name () << "::_value (void) const" << be_nl
326 << "return this->_pd_value.in ();" << be_uidt_nl
329 // Modifier function with one argument of type char *
330 *os
<< "ACE_INLINE void" << be_nl
331 << vb_node
->name () << "::_value ("
332 << node
->full_name () << " val)" << be_nl
334 << "this->_pd_value = val;" << be_uidt_nl
337 // Modifier function with one argument of type const char *
338 *os
<< "ACE_INLINE void" << be_nl
339 << vb_node
->name () << "::_value (const "
340 << node
->full_name () << " val)" << be_nl
342 << "this->_pd_value = val;" << be_uidt_nl
345 // Modifier function with one argument of type const CORBA::String_var&
346 *os
<< "ACE_INLINE void" << be_nl
347 << vb_node
->name () << "::_value (const ::CORBA::" << string_type
348 << "_var& var)" << be_nl
350 << "this->_pd_value = var;" << be_uidt_nl
353 // Access to the boxed value for method signatures
354 *os
<< "ACE_INLINE const " << node
->full_name () << be_nl
355 << vb_node
->name () << "::_boxed_in (void) const" << be_nl
357 << "return this->_pd_value.in ();" << be_uidt_nl
360 *os
<< "ACE_INLINE " << node
->full_name () << "&" << be_nl
361 << vb_node
->name () << "::_boxed_inout (void)" << be_nl
363 << "return this->_pd_value.inout ();" << be_uidt_nl
366 *os
<< "ACE_INLINE " << node
->full_name () << "&" << be_nl
367 << vb_node
->name () << "::_boxed_out (void)" << be_nl
369 << "return this->_pd_value.out ();" << be_uidt_nl
372 // Overloaded subscript operators
373 *os
<< "ACE_INLINE " << char_type
<< " &" << be_nl
374 << vb_node
->name () << "::operator[] ( ::CORBA::ULong slot)" << be_nl
376 << "return this->_pd_value[slot];" << be_uidt_nl
379 *os
<< "ACE_INLINE " << char_type
<< be_nl
380 << vb_node
->name () << "::operator[] ( ::CORBA::ULong slot) const" << be_nl
382 << "return this->_pd_value[slot];" << be_uidt_nl
389 be_visitor_valuebox_ci::visit_structure (be_structure
*node
)
391 TAO_OutStream
*os
= this->ctx_
->stream ();
393 TAO_INSERT_COMMENT (os
);
395 this->emit_default_constructor_alloc (node
);
396 this->emit_constructor_one_arg_alloc (node
);
397 this->emit_copy_constructor_alloc (node
);
398 this->emit_assignment_alloc (node
);
399 this->emit_accessor_modifier (node
);
401 // Access to the boxed value for method signatures
402 if (node
->size_type() == AST_Type::FIXED
)
404 this->emit_boxed_access (node
, "");
408 this->emit_boxed_access (node
, "*");
411 // Now generate the accessor and modifier functions for each struct
412 // member. These functions have the same signatures as
413 // acessor and modifier functions for union members.
416 be_visitor_context
ctx (*this->ctx_
);
418 for (UTL_ScopeActiveIterator
si (node
, UTL_Scope::IK_decls
);
424 if (d
== 0 || (field
= dynamic_cast<be_field
*> (d
)) == 0)
426 ACE_ERROR ((LM_ERROR
,
427 "(%N:%l) be_visitor_valuebox_cs::visit_structure -"
428 "bad node in this scope\n"));
432 // Create a visitor and use that to process the field type.
433 be_visitor_valuebox_field_ci
visitor (&ctx
);
435 if (visitor
.visit_field (field
) == -1)
437 ACE_ERROR_RETURN ((LM_ERROR
,
438 "(%N:%l) be_visitor_valuebox_cs::visit_structure - "
439 "visit_field failed\n"
443 // Restore the valuebox node in the field visitor's context.
444 ctx
.node (this->ctx_
->node ());
451 be_visitor_valuebox_ci::visit_typedef (be_typedef
*node
)
453 // Make a decision based on the primitive base type.
454 be_type
*bt
= node
->primitive_base_type ();
456 if (!bt
|| (bt
->accept (this) == -1))
458 ACE_ERROR_RETURN ((LM_ERROR
,
459 "(%N:%l) be_visitor_valuebox_ci::"
461 "Bad primitive type\n"),
469 be_visitor_valuebox_ci::visit_union (be_union
*node
)
471 TAO_OutStream
*os
= this->ctx_
->stream ();
473 TAO_INSERT_COMMENT (os
);
475 this->emit_default_constructor_alloc (node
);
476 this->emit_constructor_one_arg_alloc (node
);
477 this->emit_copy_constructor_alloc (node
);
478 this->emit_assignment_alloc (node
);
479 this->emit_accessor_modifier (node
);
481 be_valuebox
*vb_node
=
482 dynamic_cast<be_valuebox
*> (this->ctx_
->node ());
484 if (node
->size_type() == AST_Type::FIXED
)
486 this->emit_boxed_access (node
, "");
490 this->emit_boxed_access (node
, "*");
493 // Now generate the accessor and modifier functions for each union
496 be_union_branch
*member
;
497 be_visitor_context
ctx (*this->ctx_
);
499 for (UTL_ScopeActiveIterator
si (node
, UTL_Scope::IK_decls
);
505 if (d
== 0 || (member
= dynamic_cast<be_union_branch
*> (d
)) == 0)
507 ACE_ERROR ((LM_ERROR
,
508 "(%N:%l) be_visitor_valuebox_ci::visit_union -"
509 "bad node in this scope\n"));
513 // Create a visitor and use that to process the union member type.
514 be_visitor_valuebox_union_member_ci
visitor (&ctx
);
516 if (visitor
.visit_union_member (member
) == -1)
518 ACE_ERROR_RETURN ((LM_ERROR
,
519 "(%N:%l) be_visitor_valuebox_cs::visit_structure - "
520 "visit_field failed\n"
524 // Restore the valuebox node to the union member visitor's
530 // Retrieve the disriminant type.
532 bt
= dynamic_cast<be_type
*> (node
->disc_type ());
536 ACE_ERROR_RETURN ((LM_ERROR
,
537 "(%N:%l) be_visitor_valuebox_ci::visit_union - "
538 "bad disciminant type\n"),
543 // Generate modifier and accessor for discriminant
544 *os
<< "ACE_INLINE void" << be_nl
545 << vb_node
->name () << "::_d (" << bt
->nested_type_name (node
) << " val)"
548 << "this->_pd_value->_d (val);" << be_uidt_nl
551 *os
<< "ACE_INLINE " << bt
->nested_type_name (node
) << be_nl
552 << vb_node
->name () << "::_d (void) const" << be_nl
554 << "return this->_pd_value->_d ();" << be_uidt_nl
563 be_visitor_valuebox_ci::emit_for_predef_enum (be_type
*node
,
564 const char * type_suffix
,
567 TAO_OutStream
*os
= this->ctx_
->stream ();
569 // Retrieve the node being visited by this be_visitor_valuebox_ci.
570 be_decl
* vb_node
= this->ctx_
->node ();
572 TAO_INSERT_COMMENT (os
);
576 this->emit_default_constructor_alloc (node
);
577 this->emit_copy_constructor_alloc (node
);
578 this->emit_constructor_one_arg_alloc (node
);
579 this->emit_assignment_alloc (node
);
580 this->emit_accessor_modifier (node
);
581 this->emit_boxed_access (node
, "*");
585 this->emit_default_constructor ();
586 this->emit_copy_constructor ();
587 this->emit_constructor_one_arg (node
, type_suffix
);
588 this->emit_assignment (node
, type_suffix
);
590 // Public accessor method
591 *os
<< "ACE_INLINE " << node
->full_name () << type_suffix
<< be_nl
592 << vb_node
->name () << "::_value (void) const" << be_nl
594 << "return this->_pd_value;" << be_uidt_nl
597 // Public modifier method
598 *os
<< "ACE_INLINE void" << be_nl
599 << vb_node
->name () << "::_value ("
600 << node
->full_name ()
601 << type_suffix
<< " val)" << be_nl
603 << "this->_pd_value = val;" << be_uidt_nl
606 // Explicit conversion functions
607 *os
<< "ACE_INLINE " << node
->full_name () << type_suffix
<< be_nl
608 << vb_node
->name () << "::_boxed_in (void) const" << be_nl
610 << "return this->_pd_value;" << be_uidt_nl
613 *os
<< "ACE_INLINE " << node
->full_name () << type_suffix
<< "&" << be_nl
614 << vb_node
->name () << "::_boxed_inout (void)" << be_nl
616 << "return this->_pd_value;" << be_uidt_nl
619 *os
<< "ACE_INLINE " << node
->full_name () << type_suffix
<< "&" << be_nl
620 << vb_node
->name () << "::_boxed_out (void)" << be_nl
622 << "return this->_pd_value;" << be_uidt_nl
631 be_visitor_valuebox_ci::emit_default_constructor (void)
633 TAO_OutStream
*os
= this->ctx_
->stream ();
635 // Retrieve the node being visited by this be_visitor_valuebox_ci.
636 be_decl
* vb_node
= this->ctx_
->node ();
638 // Public default constructor
639 *os
<< "ACE_INLINE" << be_nl
;
640 *os
<< vb_node
->name () << "::" << vb_node
->local_name ()
641 << " (void)" << be_nl
;
642 *os
<< "{}" << be_nl_2
;
646 be_visitor_valuebox_ci::emit_default_constructor_alloc (be_decl
*node
)
648 TAO_OutStream
*os
= this->ctx_
->stream ();
650 // Retrieve the node being visited by this be_visitor_valuebox_ci
651 be_decl
* vb_node
= this->ctx_
->node ();
653 dynamic_cast<be_type
*> (node
)->size_type () == AST_Type::VARIABLE
;
655 // Public default constructor
656 *os
<< "ACE_INLINE" << be_nl
657 << vb_node
->name () << "::" << vb_node
->local_name () << " (void)"
658 << be_nl
<< "{" << be_idt_nl
659 << node
->full_name () << "* p = 0;" << be_nl
660 << "ACE_NEW (" << be_idt_nl
662 << node
->full_name ()
663 << (node_not_pod
? " ()" : "") << ");" << be_uidt_nl
664 << "this->_pd_value = p;" << be_uidt_nl
669 be_visitor_valuebox_ci::emit_constructor_one_arg (be_decl
*node
,
670 const char * type_suffix
)
672 TAO_OutStream
*os
= this->ctx_
->stream ();
674 // Retrieve the node being visited by this be_visitor_valuebox_ci.
675 be_decl
* vb_node
= this->ctx_
->node ();
677 // Public constructor with one argument of underlying type
678 *os
<< "ACE_INLINE" << be_nl
679 << vb_node
->name () << "::" << vb_node
->local_name () << " ("
680 << node
->full_name () << type_suffix
<< " val)" << be_nl
682 << "this->_pd_value = val;" << be_uidt_nl
687 be_visitor_valuebox_ci::emit_constructor_one_arg_alloc (be_decl
*node
)
689 TAO_OutStream
*os
= this->ctx_
->stream ();
691 // Retrieve the node being visited by this be_visitor_valuebox_ci.
692 be_decl
* vb_node
= this->ctx_
->node ();
694 // Public constructor with single argument of type const T&
695 *os
<< "ACE_INLINE" << be_nl
696 << vb_node
->name () << "::" << vb_node
->local_name ()
697 << " (const " << node
->full_name () << "& value)" << be_nl
699 << node
->full_name () << "* p = 0;" << be_nl
700 << "ACE_NEW (" << be_idt_nl
702 << node
->full_name () << " (value));" << be_uidt_nl
703 << "this->_pd_value = p;" << be_uidt_nl
708 be_visitor_valuebox_ci::emit_copy_constructor (void)
710 TAO_OutStream
*os
= this->ctx_
->stream ();
712 // Retrieve the node being visited by this be_visitor_valuebox_ci.
713 be_decl
* vb_node
= this->ctx_
->node ();
715 // Public Copy constructor
716 *os
<< "ACE_INLINE" << be_nl
717 << vb_node
->name () << "::" << vb_node
->local_name ()
718 << " (const " << vb_node
->full_name () << "& val)" << be_idt_nl
719 << ": ::CORBA::ValueBase (val)," << be_nl
720 << " ::CORBA::DefaultValueRefCountBase (val)"
723 << "this->_pd_value = val._pd_value;" << be_uidt_nl
728 be_visitor_valuebox_ci::emit_copy_constructor_alloc (be_decl
*node
)
730 TAO_OutStream
*os
= this->ctx_
->stream ();
732 // Retrieve the node being visited by this be_visitor_valuebox_ci.
733 be_decl
* vb_node
= this->ctx_
->node ();
735 // Public copy constructor
736 *os
<< "ACE_INLINE" << be_nl
737 << vb_node
->name () << "::" << vb_node
->local_name () << " (const "
738 << vb_node
->full_name () << "& val)" << be_idt_nl
739 << ": ::CORBA::ValueBase (val)," << be_nl
740 << " ::CORBA::DefaultValueRefCountBase (val)"
743 << node
->full_name () << "* p = 0;" << be_nl
744 << "ACE_NEW (" << be_idt_nl
746 << node
->full_name () << " (val._pd_value.in ()));" << be_uidt_nl
747 << "this->_pd_value = p;" << be_uidt_nl
753 be_visitor_valuebox_ci::emit_assignment (be_decl
*node
,
754 const char * type_suffix
)
756 TAO_OutStream
*os
= this->ctx_
->stream ();
758 // Retrieve the node being visited by this be_visitor_valuebox_ci.
759 be_decl
* vb_node
= this->ctx_
->node ();
761 // Public assignment operator with one argument of underlying type
762 *os
<< "ACE_INLINE " << vb_node
->name () << " &" << be_nl
763 << vb_node
->name () << "::operator= ("
764 << node
->full_name () << type_suffix
<< " val)" << be_nl
766 << "this->_pd_value = val;" << be_nl
767 << "return *this;" << be_uidt_nl
772 be_visitor_valuebox_ci::emit_assignment_alloc (be_decl
*node
)
774 TAO_OutStream
*os
= this->ctx_
->stream ();
776 // Retrieve the node being visited by this be_visitor_valuebox_ci.
777 be_decl
* vb_node
= this->ctx_
->node ();
779 // Public assignment operator with one argument of type const T&
780 *os
<< "ACE_INLINE " << vb_node
->name () << " &" << be_nl
781 << vb_node
->name () << "::operator= (const "
782 << node
->full_name () << "& value)" << be_nl
784 << node
->full_name () << "* p = 0;" << be_nl
785 << "ACE_NEW_RETURN (" << be_idt_nl
787 << node
->full_name () << " (value)," << be_nl
788 << "*this);" << be_uidt_nl
<< be_nl
789 << "this->_pd_value = p;" << be_nl
790 << "return *this;" << be_uidt_nl
796 be_visitor_valuebox_ci::emit_accessor_modifier (be_decl
*node
)
798 TAO_OutStream
*os
= this->ctx_
->stream ();
800 // Retrieve the node being visited by this be_visitor_valuebox_ci.
801 be_decl
* vb_node
= this->ctx_
->node ();
803 // Public accessor method (const)
804 *os
<< "ACE_INLINE const " << node
->full_name () << " &" << be_nl
805 << vb_node
->name () << "::_value (void) const" << be_nl
807 << "return this->_pd_value.in ();" << be_uidt_nl
810 // Public accessor method
811 *os
<< "ACE_INLINE " << node
->full_name () << " &" << be_nl
812 << vb_node
->name () << "::_value (void)" << be_nl
814 << "return this->_pd_value.inout ();" << be_uidt_nl
817 // Public modifier method
818 *os
<< "ACE_INLINE void" << be_nl
819 << vb_node
->name () << "::_value (const "
820 << node
->full_name () << "& value)" << be_nl
822 << node
->full_name () << "* p = 0;" << be_nl
823 << "ACE_NEW (" << be_idt_nl
825 << node
->full_name () << " (value));" << be_uidt_nl
826 << "this->_pd_value = p;" << be_uidt_nl
831 be_visitor_valuebox_ci::emit_boxed_access (be_decl
*node
,
832 const char *out_ref_modifier
)
834 TAO_OutStream
*os
= this->ctx_
->stream ();
836 // Retrieve the node being visited by this be_visitor_valuebox_ci.
837 be_decl
* vb_node
= this->ctx_
->node ();
839 // Access to the boxed value for method signatures
840 *os
<< "ACE_INLINE const " << node
->full_name () << " &" << be_nl
841 << vb_node
->name () << "::_boxed_in (void) const" << be_nl
843 << "return this->_pd_value.in ();" << be_uidt_nl
846 *os
<< "ACE_INLINE " << node
->full_name () << "&" << be_nl
847 << vb_node
->name () << "::_boxed_inout (void)" << be_nl
849 << "return this->_pd_value.inout ();" << be_uidt_nl
852 *os
<< "ACE_INLINE " << node
->full_name ()
853 << out_ref_modifier
<< "&" << be_nl
854 << vb_node
->name () << "::_boxed_out (void)" << be_nl
856 << "return this->_pd_value.out ();" << be_uidt_nl