diff options
Diffstat (limited to 'TAO/TAO_IDL/ast/ast_union_branch.cpp')
-rw-r--r-- | TAO/TAO_IDL/ast/ast_union_branch.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/ast/ast_union_branch.cpp b/TAO/TAO_IDL/ast/ast_union_branch.cpp index 736e15ec3a4..9f1809d397d 100644 --- a/TAO/TAO_IDL/ast/ast_union_branch.cpp +++ b/TAO/TAO_IDL/ast/ast_union_branch.cpp @@ -71,6 +71,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "ast_union_branch.h" #include "ast_union_label.h" +#include "ast_union.h" #include "ast_visitor.h" #include "utl_labellist.h" @@ -161,6 +162,28 @@ AST_UnionBranch::label_list_length (void) } } +void +AST_UnionBranch::add_labels (AST_Union *u) +{ + AST_UnionLabel *ul = 0; + AST_Expression *ex = 0; + + for (UTL_LabellistActiveIterator i (this->pd_ll); + !i.is_done (); + i.next ()) + { + ul = i.item (); + + if (ul->label_kind () == AST_UnionLabel::UL_default) + { + return; + } + + ex = ul->label_val (); + u->add_to_name_referenced (ex->n ()->first_component ()); + } +} + // Narrowing. IMPL_NARROW_METHODS1(AST_UnionBranch, AST_Field) IMPL_NARROW_FROM_DECL(AST_UnionBranch) |