Merge pull request #2220 from DOCGroup/revert-2217-jwi-inetwraning
[ACE_TAO.git] / TAO / TAO_IDL / be / be_valuebox.cpp
blobeca86d934837cd37480830a097aeabaa61ca1277
2 //=============================================================================
3 /**
4 * @file be_valuebox.cpp
6 * Extension of class AST_Valuebox that provides additional means for C++
7 * mapping.
9 * @author Gary Maxey
11 //=============================================================================
13 #include "be_valuebox.h"
14 #include "be_type.h"
15 #include "be_visitor.h"
16 #include "global_extern.h"
18 be_valuebox::be_valuebox (AST_Type *boxed_type,
19 UTL_ScopedName *n)
20 : COMMON_Base (),
21 AST_Decl (AST_Decl::NT_valuebox,
22 n),
23 AST_Type (AST_Decl::NT_valuebox,
24 n),
25 AST_ConcreteType (AST_Decl::NT_valuebox,
26 n),
27 AST_ValueBox (n,
28 boxed_type),
29 be_decl (AST_Decl::NT_valuebox,
30 n),
31 be_type (AST_Decl::NT_valuebox,
34 // Always the case (according to C++ mapping specification).
35 this->size_type (AST_Type::VARIABLE);
37 if (!this->imported ())
39 // Set the flag that says we have a valuetype in this IDL file.
40 // This allows the correct #include to be generated (see be_codegen.cpp).
41 idl_global->valuebase_seen_ = true;
43 // Set the flag that says we have a valuetype in this IDL file.
44 // This allows the correct #include to be generated (see be_codegen.cpp).
45 idl_global->valuetype_seen_ = true;
47 idl_global->var_size_decl_seen_ = true;
51 // Accept a visitor.
52 int
53 be_valuebox::accept (be_visitor *visitor)
55 return visitor->visit_valuebox (this);
59 void
60 be_valuebox::destroy ()
62 // Call the destroy methods of our base classes.
63 this->AST_ValueBox::destroy ();
64 this->be_type::destroy ();