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 ()
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 () << " ()"
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 () 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 ()" << 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 () 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 ()" << 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 ()" << 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 () 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 () 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 () 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 () 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 ()" << 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 ()" << 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
== nullptr || (field
= dynamic_cast<be_field
*> (d
)) == nullptr)
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
== nullptr || (member
= dynamic_cast<be_union_branch
*> (d
)) == nullptr)
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.
531 be_type
*bt
= nullptr;
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 () const" << be_nl
554 << "return this->_pd_value->_d ();" << be_uidt_nl
562 be_visitor_valuebox_ci::emit_for_predef_enum (be_type
*node
,
563 const char * type_suffix
,
566 TAO_OutStream
*os
= this->ctx_
->stream ();
568 // Retrieve the node being visited by this be_visitor_valuebox_ci.
569 be_decl
* vb_node
= this->ctx_
->node ();
571 TAO_INSERT_COMMENT (os
);
575 this->emit_default_constructor_alloc (node
);
576 this->emit_copy_constructor_alloc (node
);
577 this->emit_constructor_one_arg_alloc (node
);
578 this->emit_assignment_alloc (node
);
579 this->emit_accessor_modifier (node
);
580 this->emit_boxed_access (node
, "*");
584 this->emit_default_constructor ();
585 this->emit_copy_constructor ();
586 this->emit_constructor_one_arg (node
, type_suffix
);
587 this->emit_assignment (node
, type_suffix
);
589 // Public accessor method
590 *os
<< "ACE_INLINE " << node
->full_name () << type_suffix
<< be_nl
591 << vb_node
->name () << "::_value () const" << be_nl
593 << "return this->_pd_value;" << be_uidt_nl
596 // Public modifier method
597 *os
<< "ACE_INLINE void" << be_nl
598 << vb_node
->name () << "::_value ("
599 << node
->full_name ()
600 << type_suffix
<< " val)" << be_nl
602 << "this->_pd_value = val;" << be_uidt_nl
605 // Explicit conversion functions
606 *os
<< "ACE_INLINE " << node
->full_name () << type_suffix
<< be_nl
607 << vb_node
->name () << "::_boxed_in () const" << be_nl
609 << "return this->_pd_value;" << be_uidt_nl
612 *os
<< "ACE_INLINE " << node
->full_name () << type_suffix
<< "&" << be_nl
613 << vb_node
->name () << "::_boxed_inout ()" << be_nl
615 << "return this->_pd_value;" << be_uidt_nl
618 *os
<< "ACE_INLINE " << node
->full_name () << type_suffix
<< "&" << be_nl
619 << vb_node
->name () << "::_boxed_out ()" << be_nl
621 << "return this->_pd_value;" << be_uidt_nl
629 be_visitor_valuebox_ci::emit_default_constructor ()
631 TAO_OutStream
*os
= this->ctx_
->stream ();
633 // Retrieve the node being visited by this be_visitor_valuebox_ci.
634 be_decl
* vb_node
= this->ctx_
->node ();
636 // Public default constructor
637 *os
<< "ACE_INLINE" << be_nl
;
638 *os
<< vb_node
->name () << "::" << vb_node
->local_name ()
640 *os
<< "{}" << be_nl_2
;
644 be_visitor_valuebox_ci::emit_default_constructor_alloc (be_decl
*node
)
646 TAO_OutStream
*os
= this->ctx_
->stream ();
648 // Retrieve the node being visited by this be_visitor_valuebox_ci
649 be_decl
* vb_node
= this->ctx_
->node ();
651 dynamic_cast<be_type
*> (node
)->size_type () == AST_Type::VARIABLE
;
653 // Public default constructor
654 *os
<< "ACE_INLINE" << be_nl
655 << vb_node
->name () << "::" << vb_node
->local_name () << " ()"
656 << be_nl
<< "{" << be_idt_nl
657 << node
->full_name () << "* p = 0;" << be_nl
658 << "ACE_NEW (" << be_idt_nl
660 << node
->full_name ()
661 << (node_not_pod
? " ()" : "") << ");" << be_uidt_nl
662 << "this->_pd_value = p;" << be_uidt_nl
667 be_visitor_valuebox_ci::emit_constructor_one_arg (be_decl
*node
,
668 const char * type_suffix
)
670 TAO_OutStream
*os
= this->ctx_
->stream ();
672 // Retrieve the node being visited by this be_visitor_valuebox_ci.
673 be_decl
* vb_node
= this->ctx_
->node ();
675 // Public constructor with one argument of underlying type
676 *os
<< "ACE_INLINE" << be_nl
677 << vb_node
->name () << "::" << vb_node
->local_name () << " ("
678 << node
->full_name () << type_suffix
<< " val)" << be_nl
680 << "this->_pd_value = val;" << be_uidt_nl
685 be_visitor_valuebox_ci::emit_constructor_one_arg_alloc (be_decl
*node
)
687 TAO_OutStream
*os
= this->ctx_
->stream ();
689 // Retrieve the node being visited by this be_visitor_valuebox_ci.
690 be_decl
* vb_node
= this->ctx_
->node ();
692 // Public constructor with single argument of type const T&
693 *os
<< "ACE_INLINE" << be_nl
694 << vb_node
->name () << "::" << vb_node
->local_name ()
695 << " (const " << node
->full_name () << "& value)" << be_nl
697 << node
->full_name () << "* p = 0;" << be_nl
698 << "ACE_NEW (" << be_idt_nl
700 << node
->full_name () << " (value));" << be_uidt_nl
701 << "this->_pd_value = p;" << be_uidt_nl
706 be_visitor_valuebox_ci::emit_copy_constructor ()
708 TAO_OutStream
*os
= this->ctx_
->stream ();
710 // Retrieve the node being visited by this be_visitor_valuebox_ci.
711 be_decl
* vb_node
= this->ctx_
->node ();
713 // Public Copy constructor
714 *os
<< "ACE_INLINE" << be_nl
715 << vb_node
->name () << "::" << vb_node
->local_name ()
716 << " (const " << vb_node
->full_name () << "& val)" << be_idt_nl
717 << ": ::CORBA::ValueBase (val)," << be_nl
718 << " ::CORBA::DefaultValueRefCountBase (val)"
721 << "this->_pd_value = val._pd_value;" << be_uidt_nl
726 be_visitor_valuebox_ci::emit_copy_constructor_alloc (be_decl
*node
)
728 TAO_OutStream
*os
= this->ctx_
->stream ();
730 // Retrieve the node being visited by this be_visitor_valuebox_ci.
731 be_decl
* vb_node
= this->ctx_
->node ();
733 // Public copy constructor
734 *os
<< "ACE_INLINE" << be_nl
735 << vb_node
->name () << "::" << vb_node
->local_name () << " (const "
736 << vb_node
->full_name () << "& val)" << be_idt_nl
737 << ": ::CORBA::ValueBase (val)," << be_nl
738 << " ::CORBA::DefaultValueRefCountBase (val)"
741 << node
->full_name () << "* p = 0;" << be_nl
742 << "ACE_NEW (" << be_idt_nl
744 << node
->full_name () << " (val._pd_value.in ()));" << be_uidt_nl
745 << "this->_pd_value = p;" << be_uidt_nl
751 be_visitor_valuebox_ci::emit_assignment (be_decl
*node
,
752 const char * type_suffix
)
754 TAO_OutStream
*os
= this->ctx_
->stream ();
756 // Retrieve the node being visited by this be_visitor_valuebox_ci.
757 be_decl
* vb_node
= this->ctx_
->node ();
759 // Public assignment operator with one argument of underlying type
760 *os
<< "ACE_INLINE " << vb_node
->name () << " &" << be_nl
761 << vb_node
->name () << "::operator= ("
762 << node
->full_name () << type_suffix
<< " val)" << be_nl
764 << "this->_pd_value = val;" << be_nl
765 << "return *this;" << be_uidt_nl
770 be_visitor_valuebox_ci::emit_assignment_alloc (be_decl
*node
)
772 TAO_OutStream
*os
= this->ctx_
->stream ();
774 // Retrieve the node being visited by this be_visitor_valuebox_ci.
775 be_decl
* vb_node
= this->ctx_
->node ();
777 // Public assignment operator with one argument of type const T&
778 *os
<< "ACE_INLINE " << vb_node
->name () << " &" << be_nl
779 << vb_node
->name () << "::operator= (const "
780 << node
->full_name () << "& value)" << be_nl
782 << node
->full_name () << "* p = 0;" << be_nl
783 << "ACE_NEW_RETURN (" << be_idt_nl
785 << node
->full_name () << " (value)," << be_nl
786 << "*this);" << be_uidt_nl
<< be_nl
787 << "this->_pd_value = p;" << be_nl
788 << "return *this;" << be_uidt_nl
794 be_visitor_valuebox_ci::emit_accessor_modifier (be_decl
*node
)
796 TAO_OutStream
*os
= this->ctx_
->stream ();
798 // Retrieve the node being visited by this be_visitor_valuebox_ci.
799 be_decl
* vb_node
= this->ctx_
->node ();
801 // Public accessor method (const)
802 *os
<< "ACE_INLINE const " << node
->full_name () << " &" << be_nl
803 << vb_node
->name () << "::_value () const" << be_nl
805 << "return this->_pd_value.in ();" << be_uidt_nl
808 // Public accessor method
809 *os
<< "ACE_INLINE " << node
->full_name () << " &" << be_nl
810 << vb_node
->name () << "::_value ()" << be_nl
812 << "return this->_pd_value.inout ();" << be_uidt_nl
815 // Public modifier method
816 *os
<< "ACE_INLINE void" << be_nl
817 << vb_node
->name () << "::_value (const "
818 << node
->full_name () << "& value)" << be_nl
820 << node
->full_name () << "* p = 0;" << be_nl
821 << "ACE_NEW (" << be_idt_nl
823 << node
->full_name () << " (value));" << be_uidt_nl
824 << "this->_pd_value = p;" << be_uidt_nl
829 be_visitor_valuebox_ci::emit_boxed_access (be_decl
*node
,
830 const char *out_ref_modifier
)
832 TAO_OutStream
*os
= this->ctx_
->stream ();
834 // Retrieve the node being visited by this be_visitor_valuebox_ci.
835 be_decl
* vb_node
= this->ctx_
->node ();
837 // Access to the boxed value for method signatures
838 *os
<< "ACE_INLINE const " << node
->full_name () << " &" << be_nl
839 << vb_node
->name () << "::_boxed_in () const" << be_nl
841 << "return this->_pd_value.in ();" << be_uidt_nl
844 *os
<< "ACE_INLINE " << node
->full_name () << "&" << be_nl
845 << vb_node
->name () << "::_boxed_inout ()" << be_nl
847 << "return this->_pd_value.inout ();" << be_uidt_nl
850 *os
<< "ACE_INLINE " << node
->full_name ()
851 << out_ref_modifier
<< "&" << be_nl
852 << vb_node
->name () << "::_boxed_out ()" << be_nl
854 << "return this->_pd_value.out ();" << be_uidt_nl