summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp99
1 files changed, 44 insertions, 55 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp
index 7b7a0d0c473..4f34840fb76 100644
--- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp
@@ -1,17 +1,26 @@
-
-//=============================================================================
-/**
- * @file public_ci.cpp
- *
- * $Id$
- *
- * Visitor generating code for Union Branch in the client inline file.
- *
- *
- * @author Aniruddha Gokhale
- */
-//=============================================================================
-
+//
+// $Id$
+//
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO IDL
+//
+// = FILENAME
+// public_ci.cpp
+//
+// = DESCRIPTION
+// Visitor generating code for Union Branch in the client inline file.
+//
+// = AUTHOR
+// Aniruddha Gokhale
+//
+// ============================================================================
+
+ACE_RCSID (be_visitor_union_branch,
+ public_ci,
+ "$Id$")
// *****************************************************
// Visitor for union_branch in the client inline file.
@@ -64,10 +73,8 @@ be_visitor_union_branch_public_ci::visit_union_branch (be_union_branch *node)
int
be_visitor_union_branch_public_ci::visit_array (be_array *node)
{
- be_union_branch *ub =
- be_union_branch::narrow_from_decl (this->ctx_->node ());
- be_union *bu =
- be_union::narrow_from_scope (this->ctx_->scope ());
+ be_union_branch *ub = this->ctx_->be_node_as_union_branch ();
+ be_union *bu = this->ctx_->be_scope_as_union ();
be_type *bt = 0;
// Check if we are visiting this node via a visit to a typedef node.
@@ -199,10 +206,8 @@ be_visitor_union_branch_public_ci::visit_array (be_array *node)
int
be_visitor_union_branch_public_ci::visit_enum (be_enum *node)
{
- be_union_branch *ub =
- be_union_branch::narrow_from_decl (this->ctx_->node ());
- be_union *bu =
- be_union::narrow_from_scope (this->ctx_->scope ());
+ be_union_branch *ub = this->ctx_->be_node_as_union_branch ();
+ be_union *bu = this->ctx_->be_scope_as_union ();
be_type *bt = 0;
// heck if we are visiting this node via a visit to a typedef node.
@@ -270,10 +275,8 @@ be_visitor_union_branch_public_ci::visit_enum (be_enum *node)
int
be_visitor_union_branch_public_ci::visit_interface (be_interface *node)
{
- be_union_branch *ub =
- be_union_branch::narrow_from_decl (this->ctx_->node ());
- be_union *bu =
- be_union::narrow_from_scope (this->ctx_->scope ());
+ be_union_branch *ub = this->ctx_->be_node_as_union_branch ();
+ be_union *bu = this->ctx_->be_scope_as_union ();
be_type *bt = 0;
// Check if we are visiting this node via a visit to a typedef node.
@@ -360,10 +363,8 @@ be_visitor_union_branch_public_ci::visit_interface (be_interface *node)
int
be_visitor_union_branch_public_ci::visit_interface_fwd (be_interface_fwd *node)
{
- be_union_branch *ub =
- be_union_branch::narrow_from_decl (this->ctx_->node ());
- be_union *bu =
- be_union::narrow_from_scope (this->ctx_->scope ());
+ be_union_branch *ub = this->ctx_->be_node_as_union_branch ();
+ be_union *bu = this->ctx_->be_scope_as_union ();
be_type *bt = 0;
// Check if we are visiting this node via a visit to a typedef node.
@@ -468,10 +469,8 @@ be_visitor_union_branch_public_ci::visit_valuetype_fwd (be_valuetype_fwd *node)
int
be_visitor_union_branch_public_ci::emit_valuetype_common (be_type *node)
{
- be_union_branch *ub =
- be_union_branch::narrow_from_decl (this->ctx_->node ());
- be_union *bu =
- be_union::narrow_from_scope (this->ctx_->scope ());
+ be_union_branch *ub = this->ctx_->be_node_as_union_branch ();
+ be_union *bu = this->ctx_->be_scope_as_union ();
be_type *bt = 0;
// Check if we are visiting this node via a visit to a typedef node.
@@ -547,10 +546,8 @@ be_visitor_union_branch_public_ci::visit_predefined_type (
be_predefined_type *node
)
{
- be_union_branch *ub =
- be_union_branch::narrow_from_decl (this->ctx_->node ());
- be_union *bu =
- be_union::narrow_from_scope (this->ctx_->scope ());
+ be_union_branch *ub = this->ctx_->be_node_as_union_branch ();
+ be_union *bu = this->ctx_->be_scope_as_union ();
be_type *bt = 0;
// Check if we are visiting this node via a visit to a typedef node.
@@ -759,10 +756,8 @@ be_visitor_union_branch_public_ci::visit_predefined_type (
int
be_visitor_union_branch_public_ci::visit_sequence (be_sequence *node)
{
- be_union_branch *ub =
- be_union_branch::narrow_from_decl (this->ctx_->node ());
- be_union *bu =
- be_union::narrow_from_scope (this->ctx_->scope ());
+ be_union_branch *ub = this->ctx_->be_node_as_union_branch ();
+ be_union *bu = this->ctx_->be_scope_as_union ();
be_type *bt = 0;
// Check if we are visiting this node via a visit to a typedef node.
@@ -841,12 +836,10 @@ be_visitor_union_branch_public_ci::visit_sequence (be_sequence *node)
int
be_visitor_union_branch_public_ci::visit_string (be_string *node)
{
- be_union_branch *ub =
- be_union_branch::narrow_from_decl (this->ctx_->node ());
- be_union *bu =
- be_union::narrow_from_scope (this->ctx_->scope ());
+ be_union_branch *ub = this->ctx_->be_node_as_union_branch ();
+ be_union *bu = this->ctx_->be_scope_as_union ();
- if (ub == 0 || bu == 0)
+ if (!ub || !bu)
{
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) be_visitor_union_branch_public_ci::"
@@ -1012,10 +1005,8 @@ be_visitor_union_branch_public_ci::visit_string (be_string *node)
int
be_visitor_union_branch_public_ci::visit_structure (be_structure *node)
{
- be_union_branch *ub =
- be_union_branch::narrow_from_decl (this->ctx_->node ());
- be_union *bu =
- be_union::narrow_from_scope (this->ctx_->scope ());
+ be_union_branch *ub = this->ctx_->be_node_as_union_branch ();
+ be_union *bu = this->ctx_->be_scope_as_union ();
be_type *bt = 0;
// Check if we are visiting this node via a visit to a typedef node.
@@ -1170,10 +1161,8 @@ be_visitor_union_branch_public_ci::visit_typedef (be_typedef *node)
int
be_visitor_union_branch_public_ci::visit_union (be_union *node)
{
- be_union_branch *ub =
- be_union_branch::narrow_from_decl (this->ctx_->node ());
- be_union *bu =
- be_union::narrow_from_scope (this->ctx_->scope ());
+ be_union_branch *ub = this->ctx_->be_node_as_union_branch ();
+ be_union *bu = this->ctx_->be_scope_as_union ();
be_type *bt = 0;
// Check if we are visiting this node via a visit to a typedef node.