summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_structure.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_structure.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_structure.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/TAO/TAO_IDL/be/be_structure.cpp b/TAO/TAO_IDL/be/be_structure.cpp
index dd450a8a738..6390860c9be 100644
--- a/TAO/TAO_IDL/be/be_structure.cpp
+++ b/TAO/TAO_IDL/be/be_structure.cpp
@@ -24,6 +24,7 @@
#include "be_helper.h"
#include "be_visitor.h"
#include "be_extern.h"
+#include "ast_field.h"
#include "utl_identifier.h"
ACE_RCSID (be,
@@ -81,7 +82,7 @@ be_structure::gen_var_defn (char *)
*ch << namebuf << " (const " << namebuf << " &);" << be_nl;
// Fixed-size types only.
- if (this->size_type () == be_decl::FIXED)
+ if (this->size_type () == AST_Type::FIXED)
{
*ch << "// Fixed-size types only." << be_nl;
*ch << namebuf << " (const " << this->local_name ()
@@ -100,7 +101,7 @@ be_structure::gen_var_defn (char *)
*ch << namebuf << " &operator= (const " << namebuf << " &);" << be_nl;
// Fixed-size types only.
- if (this->size_type () == be_decl::FIXED)
+ if (this->size_type () == AST_Type::FIXED)
{
*ch << "// Fixed-size types only." << be_nl;
*ch << namebuf << " &operator= (const " << this->local_name ()
@@ -118,7 +119,7 @@ be_structure::gen_var_defn (char *)
*ch << "operator " << this->local_name () << " &();" << be_nl;
*ch << "operator " << this->local_name () << " &() const;" << be_nl;
- if (this->size_type () == be_decl::VARIABLE)
+ if (this->size_type () == AST_Type::VARIABLE)
{
*ch << "// Variable-size types only." << be_nl;
*ch << "operator " << this->local_name ()
@@ -130,7 +131,7 @@ be_structure::gen_var_defn (char *)
// The return types of in, out, inout, and _retn are based on the
// parameter passing rules and the base type.
- if (this->size_type () == be_decl::FIXED)
+ if (this->size_type () == AST_Type::FIXED)
{
*ch << "const " << this->local_name () << " &in (void) const;" << be_nl;
*ch << this->local_name () << " &inout (void);" << be_nl;
@@ -223,7 +224,7 @@ be_structure::gen_var_impl (char *,
*ci << "}\n\n";
// Fixed-size types only.
- if (this->size_type () == be_decl::FIXED)
+ if (this->size_type () == AST_Type::FIXED)
{
*ci << "// fixed-size types only" << be_nl;
*ci << "ACE_INLINE" << be_nl;
@@ -291,7 +292,7 @@ be_structure::gen_var_impl (char *,
<< "}\n\n";
// Fixed-size types only.
- if (this->size_type () == be_decl::FIXED)
+ if (this->size_type () == AST_Type::FIXED)
{
ci->indent ();
*ci << "// fixed-size types only" << be_nl;
@@ -364,7 +365,7 @@ be_structure::gen_var_impl (char *,
*ci << "}\n\n";
// Variable-size types only.
- if (this->size_type () == be_decl::VARIABLE)
+ if (this->size_type () == AST_Type::VARIABLE)
{
ci->indent ();
*ci << "// variable-size types only" << be_nl;
@@ -399,7 +400,7 @@ be_structure::gen_var_impl (char *,
// The out is handled differently based on our size type.
ci->indent ();
- if (this->size_type () == be_decl::VARIABLE)
+ if (this->size_type () == AST_Type::VARIABLE)
{
*ci << "// mapping for variable size " << be_nl;
*ci << "ACE_INLINE " << "::" << this->name () << " *&" << be_nl;
@@ -664,19 +665,20 @@ be_structure::compute_size_type (void)
{
// Get the next AST decl node.
AST_Decl *d = si.item ();
- be_decl *bd = be_decl::narrow_from_decl (d);
+ AST_Field *f = AST_Field::narrow_from_decl (d);
- if (bd != 0)
+ if (f != 0)
{
+ AST_Type *t = f->field_type ();
// Our sizetype depends on the sizetype of our
// members. Although previous value of sizetype may get
// overwritten, we are guaranteed by the "size_type" call
// that once the value reached be_decl::VARIABLE, nothing
// else can overwrite it.
- this->size_type (bd->size_type ());
+ this->size_type (t->size_type ());
// While we're iterating, we might as well do this one too.
- this->has_constructor (bd->has_constructor ());
+ this->has_constructor (t->has_constructor ());
}
else
{