diff options
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_context.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_context.cpp | 422 |
1 files changed, 407 insertions, 15 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_context.cpp b/TAO/TAO_IDL/be/be_visitor_context.cpp index 9a3cac5baaf..b7b41d1781a 100644 --- a/TAO/TAO_IDL/be/be_visitor_context.cpp +++ b/TAO/TAO_IDL/be/be_visitor_context.cpp @@ -1,20 +1,46 @@ - -//============================================================================= -/** - * @file be_visitor_context.cpp - * - * $Id$ - * - * Maintains the context information for visitors - * - * - * @author Aniruddha Gokhale - */ -//============================================================================= - +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO_IDL_FE +// +// = FILENAME +// be_visitor_context.cpp +// +// = DESCRIPTION +// Maintains the context information for visitors +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#include "be_argument.h" +#include "be_array.h" +#include "be_attribute.h" +#include "be_constant.h" +#include "be_enum.h" +#include "be_enum_val.h" +#include "be_exception.h" +#include "be_extern.h" +#include "be_field.h" +#include "be_interface.h" +#include "be_interface_fwd.h" +#include "be_module.h" +#include "be_operation.h" +#include "be_predefined_type.h" +#include "be_root.h" +#include "be_sequence.h" +#include "be_string.h" +#include "be_structure.h" +#include "be_typedef.h" +#include "be_union.h" +#include "be_union_branch.h" #include "be_visitor_context.h" -#include "be_extern.h" be_visitor_context::be_visitor_context (void) : ast_visitor_context (), @@ -225,6 +251,372 @@ be_visitor_context::interface (void) const return this->interface_; } +// **************************************************************** + +be_argument * +be_visitor_context::be_node_as_argument (void) +{ + if (this->node_ != 0) + { + return be_argument::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_array * +be_visitor_context::be_node_as_array (void) +{ + if (this->node_ != 0) + { + return be_array::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_attribute * +be_visitor_context::be_node_as_attribute (void) +{ + if (this->node_ != 0) + { + return be_attribute::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_constant * +be_visitor_context::be_node_as_constant (void) +{ + if (this->node_ != 0) + { + return be_constant::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_enum * +be_visitor_context::be_node_as_enum (void) +{ + if (this->node_ != 0) + { + return be_enum::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_enum_val * +be_visitor_context::be_node_as_enum_val (void) +{ + if (this->node_ != 0) + { + return be_enum_val::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_exception * +be_visitor_context::be_node_as_exception (void) +{ + if (this->node_ != 0) + { + return be_exception::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_field * +be_visitor_context::be_node_as_field (void) +{ + if (this->node_ != 0) + { + return be_field::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_interface * +be_visitor_context::be_node_as_interface (void) +{ + if (this->node_ != 0) + { + return be_interface::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_interface_fwd * +be_visitor_context::be_node_as_interface_fwd (void) +{ + if (this->node_ != 0) + { + return be_interface_fwd::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_module * +be_visitor_context::be_node_as_module (void) +{ + if (this->node_ != 0) + { + return be_module::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_operation * +be_visitor_context::be_node_as_operation (void) +{ + if (this->node_ != 0) + { + return be_operation::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_predefined_type * +be_visitor_context::be_node_as_predefined_type (void) +{ + if (this->node_ != 0) + { + return be_predefined_type::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_root * +be_visitor_context::be_node_as_root (void) +{ + if (this->node_ != 0) + { + return be_root::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_sequence * +be_visitor_context::be_node_as_sequence (void) +{ + if (this->node_ != 0) + { + return be_sequence::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_string * +be_visitor_context::be_node_as_string (void) +{ + if (this->node_ != 0) + { + return be_string::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_structure * +be_visitor_context::be_node_as_structure (void) +{ + if (this->node_ != 0) + { + return be_structure::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_typedef * +be_visitor_context::be_node_as_typedef (void) +{ + if (this->node_ != 0) + { + return be_typedef::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_union * +be_visitor_context::be_node_as_union (void) +{ + if (this->node_ != 0) + { + return be_union::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_union_branch * +be_visitor_context::be_node_as_union_branch (void) +{ + if (this->node_ != 0) + { + return be_union_branch::narrow_from_decl (this->node_); + } + else + { + return 0; + } +} + +be_enum * +be_visitor_context::be_scope_as_enum (void) +{ + if (this->scope_ != 0) + { + return be_enum::narrow_from_decl (this->scope_->decl ()); + } + else + { + return 0; + } +} + +be_exception * +be_visitor_context::be_scope_as_exception (void) +{ + if (this->scope_ != 0) + { + return be_exception::narrow_from_decl (this->scope_->decl ()); + } + else + { + return 0; + } +} + +be_interface * +be_visitor_context::be_scope_as_interface (void) +{ + if (this->scope_ != 0) + { + return be_interface::narrow_from_decl (this->scope_->decl ()); + } + else + { + return 0; + } +} + +be_module * +be_visitor_context::be_scope_as_module (void) +{ + if (this->scope_ != 0) + { + return be_module::narrow_from_decl (this->scope_->decl ()); + } + else + { + return 0; + } +} + +be_operation * +be_visitor_context::be_scope_as_operation (void) +{ + if (this->scope_ != 0) + { + return be_operation::narrow_from_decl (this->scope_->decl ()); + } + else + { + return 0; + } +} + +be_root * +be_visitor_context::be_scope_as_root (void) +{ + if (this->scope_ != 0) + { + return be_root::narrow_from_decl (this->scope_->decl ()); + } + else + { + return 0; + } +} + +be_structure * +be_visitor_context::be_scope_as_structure (void) +{ + if (this->scope_ != 0) + { + return be_structure::narrow_from_decl (this->scope_->decl ()); + } + else + { + return 0; + } +} + +be_union * +be_visitor_context::be_scope_as_union (void) +{ + if (this->scope_ != 0) + { + return be_union::narrow_from_decl (this->scope_->decl ()); + } + else + { + return 0; + } +} + const char * be_visitor_context::export_macro (void) const { |