2 //=============================================================================
6 * Extension of class AST_Field that provides additional means for C++
9 * @author Copyright 1994-1995 by Sun Microsystems
10 * @author Inc. and Aniruddha Gokhale
12 //=============================================================================
15 #include "be_visitor.h"
17 #include "global_extern.h"
18 #include "ace/Log_Msg.h"
20 be_field::be_field (AST_Type
*ft
,
23 : COMMON_Base (ft
->is_local (),
25 AST_Decl (AST_Decl::NT_field
,
30 be_decl (AST_Decl::NT_field
,
32 port_name_prefixed_ (false)
34 // This covers valuetype fields as well, which is what we want.
35 AST_Decl::NodeType nt
=
36 ft
->unaliased_type ()->node_type ();
38 if (nt
== AST_Decl::NT_string
|| nt
== AST_Decl::NT_wstring
)
40 idl_global
->string_member_seen_
= true;
45 be_field::field_type () const
48 dynamic_cast<be_type
*> (
49 this->AST_Field::field_type ());
53 be_field::gen_member_ostream_operator (TAO_OutStream
*os
,
54 const char *instance_name
,
58 be_type
*ft
= dynamic_cast<be_type
*> (this->field_type ());
59 ft
->gen_member_ostream_operator (os
,
66 be_field::port_name_prefixed () const
68 return this->port_name_prefixed_
;
72 be_field::port_name_prefixed (bool val
)
74 this->port_name_prefixed_
= val
;
78 be_field::accept (be_visitor
*visitor
)
80 return visitor
->visit_field (this);
86 this->be_decl::destroy ();
87 this->AST_Field::destroy ();