Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / TAO_IDL / be / be_attribute.cpp
blob27c06d3ed6bc941bc1b766daa8caf8d47a12b917
2 //=============================================================================
3 /**
4 * @file be_attribute.cpp
6 * Extension of class AST_Attribute 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_attribute.h"
15 #include "be_type.h"
16 #include "be_visitor.h"
17 #include "be_util.h"
19 #include "global_extern.h"
21 be_attribute::be_attribute (bool ro,
22 AST_Type *ft,
23 UTL_ScopedName *n,
24 bool local,
25 bool abstract)
26 : COMMON_Base (local,
27 abstract),
28 AST_Decl (AST_Decl::NT_attr,
29 n),
30 AST_Field (AST_Decl::NT_attr,
31 ft,
32 n),
33 AST_Attribute (ro,
34 ft,
36 local,
37 abstract),
38 be_decl (AST_Decl::NT_attr,
39 n),
40 be_field (ft,
43 if (!this->imported () && !this->is_local ())
45 // For the return types of the two operations
46 // generated from this attribute.
47 be_util::set_arg_seen_bit (dynamic_cast<be_type*> (ft));
51 be_type *
52 be_attribute::field_type (void) const
54 return dynamic_cast<be_type*> (this->AST_Attribute::field_type ());
57 int
58 be_attribute::accept (be_visitor *visitor)
60 return visitor->visit_attribute (this);
63 void
64 be_attribute::destroy (void)
66 this->be_decl::destroy ();
67 this->AST_Attribute::destroy ();
70 IMPL_NARROW_FROM_DECL (be_attribute)