2 //=============================================================================
4 * @file be_valuebox.cpp
6 * Extension of class AST_Valuebox that provides additional means for C++
11 //=============================================================================
13 #include "be_valuebox.h"
15 #include "be_visitor.h"
16 #include "global_extern.h"
18 be_valuebox::be_valuebox (AST_Type
*boxed_type
,
21 AST_Decl (AST_Decl::NT_valuebox
,
23 AST_Type (AST_Decl::NT_valuebox
,
25 AST_ConcreteType (AST_Decl::NT_valuebox
,
29 be_decl (AST_Decl::NT_valuebox
,
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;
53 be_valuebox::accept (be_visitor
*visitor
)
55 return visitor
->visit_valuebox (this);
60 be_valuebox::destroy ()
62 // Call the destroy methods of our base classes.
63 this->AST_ValueBox::destroy ();
64 this->be_type::destroy ();