Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / TAO_IDL / be / be_field.cpp
blob55c1e689cc3a6cfd1f04467ff4310ca520dd37a1
2 //=============================================================================
3 /**
4 * @file be_field.cpp
6 * Extension of class AST_Field that provides additional means for C++
7 * mapping.
9 * @author Copyright 1994-1995 by Sun Microsystems
10 * @author Inc. and Aniruddha Gokhale
12 //=============================================================================
14 #include "be_field.h"
15 #include "be_visitor.h"
16 #include "be_type.h"
17 #include "global_extern.h"
18 #include "ace/Log_Msg.h"
20 be_field::be_field (AST_Type *ft,
21 UTL_ScopedName *n,
22 Visibility vis)
23 : COMMON_Base (ft->is_local (),
24 ft->is_abstract ()),
25 AST_Decl (AST_Decl::NT_field,
26 n),
27 AST_Field (ft,
29 vis),
30 be_decl (AST_Decl::NT_field,
31 n),
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;
44 be_type *
45 be_field::field_type () const
47 return
48 dynamic_cast<be_type*> (
49 this->AST_Field::field_type ());
52 void
53 be_field::gen_member_ostream_operator (TAO_OutStream *os,
54 const char *instance_name,
55 bool use_underscore,
56 bool accessor)
58 be_type *ft = dynamic_cast<be_type*> (this->field_type ());
59 ft->gen_member_ostream_operator (os,
60 instance_name,
61 use_underscore,
62 accessor);
65 bool
66 be_field::port_name_prefixed () const
68 return this->port_name_prefixed_;
71 void
72 be_field::port_name_prefixed (bool val)
74 this->port_name_prefixed_ = val;
77 int
78 be_field::accept (be_visitor *visitor)
80 return visitor->visit_field (this);
83 void
84 be_field::destroy ()
86 this->be_decl::destroy ();
87 this->AST_Field::destroy ();