diff options
author | gokhale <gokhale@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-12 21:05:05 +0000 |
---|---|---|
committer | gokhale <gokhale@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-03-12 21:05:05 +0000 |
commit | 80e259fcebdbde024646f9b5de7f666ec0d23ce7 (patch) | |
tree | dff6fc82d5408a1feeba27c3d41fae2a416b875e /TAO/TAO_IDL/be/be_visitor_typedef.cpp | |
parent | 8d4ade0f28d20dc0d9f55f6ec81789884ded0d78 (diff) | |
download | ATCD-80e259fcebdbde024646f9b5de7f666ec0d23ce7.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_typedef.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_typedef.cpp | 69 |
1 files changed, 37 insertions, 32 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_typedef.cpp b/TAO/TAO_IDL/be/be_visitor_typedef.cpp index 08feeb33f71..eadeab1043c 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef.cpp @@ -524,19 +524,22 @@ be_visitor_typedef_ch::visit_typedef (be_typedef *node) } // generate the typecode decl for this typedef node - if (node->is_nested ()) + if (!node->imported ()) { - // we have a scoped name - os->indent (); - *os << "static CORBA::TypeCode_ptr " - << node->tc_name ()->last_component () << ";\n\n"; - } - else - { - // we are in the ROOT scope - os->indent (); - *os << "extern CORBA::TypeCode_ptr " - << node->tc_name ()->last_component () << ";\n\n"; + if (node->is_nested ()) + { + // we have a scoped name + os->indent (); + *os << "static CORBA::TypeCode_ptr " + << node->tc_name ()->last_component () << ";\n\n"; + } + else + { + // we are in the ROOT scope + os->indent (); + *os << "extern CORBA::TypeCode_ptr " + << node->tc_name ()->last_component () << ";\n\n"; + } } } @@ -881,7 +884,6 @@ be_visitor_typedef_ci::visit_typedef (be_typedef *node) ), -1); } } - // accept on this base type if (bt->accept (this) == -1) { @@ -1109,27 +1111,30 @@ be_visitor_typedef_cs::visit_typedef (be_typedef *node) ), -1); } - // generate the typecode information here - os->indent (); // start from current indentation level - *os << "static const CORBA::Long _oc_" << node->flatname () << "[] =" - << be_nl; - *os << "{\n"; - os->incr_indent (0); - if (node->gen_encapsulation () == -1) + if (!node->imported ()) { - ACE_ERROR ((LM_ERROR, "Error generating typecode\n\n")); - return -1; - } - os->decr_indent (); - *os << "};" << be_nl; - - *os << "static CORBA::TypeCode _tc__tc_" << node->flatname () - << " (CORBA::tk_alias, sizeof (_oc_" << node->flatname () - << "), (unsigned char *) &_oc_" << node->flatname () - << ", CORBA::B_FALSE);" << be_nl; - *os << "CORBA::TypeCode_ptr " << node->tc_name () << " = &_tc__tc_" - << node->flatname () << ";\n\n"; + // generate the typecode information here + os->indent (); // start from current indentation level + *os << "static const CORBA::Long _oc_" << node->flatname () << "[] =" + << be_nl; + *os << "{\n"; + os->incr_indent (0); + if (node->gen_encapsulation () == -1) + { + ACE_ERROR ((LM_ERROR, "Error generating typecode\n\n")); + return -1; + } + os->decr_indent (); + *os << "};" << be_nl; + + *os << "static CORBA::TypeCode _tc__tc_" << node->flatname () + << " (CORBA::tk_alias, sizeof (_oc_" << node->flatname () + << "), (unsigned char *) &_oc_" << node->flatname () + << ", CORBA::B_FALSE);" << be_nl; + *os << "CORBA::TypeCode_ptr " << node->tc_name () << " = &_tc__tc_" + << node->flatname () << ";\n\n"; + } } return 0; |