1 #include "be_visitor_attr_init.h"
2 #include "be_visitor_context.h"
5 #include "be_component.h"
7 #include "be_eventtype.h"
9 #include "be_predefined_type.h"
10 #include "be_sequence.h"
11 #include "be_string.h"
12 #include "be_structure.h"
13 #include "be_typedef.h"
15 #include "be_valuebox.h"
16 #include "be_valuetype.h"
18 be_visitor_attr_init::be_visitor_attr_init (
19 be_visitor_context
*ctx
)
20 : be_visitor_decl (ctx
),
25 be_visitor_attr_init::~be_visitor_attr_init (void)
30 be_visitor_attr_init::visit_array (be_array
*)
36 be_visitor_attr_init::visit_component (be_component
*node
)
38 return this->visit_interface (node
);
42 be_visitor_attr_init::visit_enum (be_enum
*node
)
44 os_
<< "static_cast< ::" << node
->full_name () << "> (0UL)";
50 be_visitor_attr_init::visit_eventtype (be_eventtype
*node
)
52 return this->visit_valuetype (node
);
56 be_visitor_attr_init::visit_home (be_home
*node
)
58 return this->visit_interface (node
);
62 be_visitor_attr_init::visit_interface (be_interface
*)
68 be_visitor_attr_init::visit_predefined_type (be_predefined_type
*node
)
72 case AST_PredefinedType::PT_boolean
:
75 case AST_PredefinedType::PT_octet
:
76 case AST_PredefinedType::PT_char
:
77 case AST_PredefinedType::PT_wchar
:
78 case AST_PredefinedType::PT_short
:
79 case AST_PredefinedType::PT_ushort
:
80 case AST_PredefinedType::PT_long
:
81 case AST_PredefinedType::PT_ulong
:
82 case AST_PredefinedType::PT_longlong
:
83 case AST_PredefinedType::PT_ulonglong
:
84 case AST_PredefinedType::PT_value
:
85 case AST_PredefinedType::PT_any
:
88 case AST_PredefinedType::PT_float
:
91 case AST_PredefinedType::PT_double
:
94 case AST_PredefinedType::PT_longdouble
:
95 os_
<< "ACE_CDR_LONG_DOUBLE_INITIALIZER";
97 case AST_PredefinedType::PT_object
:
98 os_
<< " ::CORBA::Object::_nil ()";
100 case AST_PredefinedType::PT_abstract
:
101 os_
<< " ::CORBA::AbstractBase::_nil ()";
103 case AST_PredefinedType::PT_pseudo
:
104 os_
<< " ::CORBA::TypeCode::_nil ()";
106 default: // PT_void not handled.
114 be_visitor_attr_init::visit_sequence (be_sequence
*)
120 be_visitor_attr_init::visit_string (be_string
*)
126 be_visitor_attr_init::visit_structure (be_structure
*)
132 be_visitor_attr_init::visit_typedef (be_typedef
*node
)
134 return node
->primitive_base_type ()->accept (this);
138 be_visitor_attr_init::visit_union (be_union
*)
144 be_visitor_attr_init::visit_valuebox (be_valuebox
*node
)
146 os_
<< "static_cast< ::" << node
->full_name ()
153 be_visitor_attr_init::visit_valuetype (be_valuetype
*)