Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / TAO_IDL / be / be_scope.cpp
blobd994803b7b1825fd19c54b8c3a4c2599684801c9
1 #include "be_scope.h"
2 #include "be_valuetype.h"
3 #include "be_eventtype.h"
4 #include "be_connector.h"
5 #include "be_home.h"
6 #include "be_module.h"
7 #include "be_exception.h"
8 #include "be_union.h"
9 #include "be_structure.h"
10 #include "be_enum.h"
11 #include "be_operation.h"
12 #include "be_factory.h"
13 #include "be_finder.h"
14 #include "be_root.h"
15 #include "be_visitor.h"
17 // Default Constructor.
18 be_scope::be_scope ()
19 : UTL_Scope (),
20 comma_ (0)
24 // Constructor.
25 be_scope::be_scope (AST_Decl::NodeType type)
26 : UTL_Scope (type),
27 comma_ (0)
31 be_scope::~be_scope ()
35 // Code generation methods.
37 AST_Field *
38 be_scope::be_add_field (AST_Field *f)
40 return this->fe_add_field (f);
43 AST_Argument *
44 be_scope::be_add_argument (AST_Argument *)
46 return nullptr;
49 void
50 be_scope::comma (unsigned short comma)
52 this->comma_ = comma;
55 int
56 be_scope::comma () const
58 return this->comma_;
61 // Return the scope created by this node (if one exists, else NULL).
62 be_decl *
63 be_scope::decl ()
65 switch (this->scope_node_type ())
67 case AST_Decl::NT_interface:
68 return dynamic_cast<be_interface*> (this);
69 case AST_Decl::NT_valuetype:
70 return dynamic_cast<be_valuetype*> (this);
71 case AST_Decl::NT_eventtype:
72 return dynamic_cast<be_eventtype*> (this);
73 case AST_Decl::NT_component:
74 return dynamic_cast<be_component*> (this);
75 case AST_Decl::NT_connector:
76 return dynamic_cast<be_connector*> (this);
77 case AST_Decl::NT_home:
78 return dynamic_cast<be_home*> (this);
79 case AST_Decl::NT_module:
80 return dynamic_cast<be_module*> (this);
81 case AST_Decl::NT_root:
82 return dynamic_cast<be_root*> (this);
83 case AST_Decl::NT_except:
84 return dynamic_cast<be_exception*> (this);
85 case AST_Decl::NT_union:
86 return dynamic_cast<be_union*> (this);
87 case AST_Decl::NT_struct:
88 return dynamic_cast<be_structure*> (this);
89 case AST_Decl::NT_enum:
90 return dynamic_cast<be_enum*> (this);
91 case AST_Decl::NT_op:
92 return dynamic_cast<be_operation*> (this);
93 case AST_Decl::NT_factory:
94 return dynamic_cast<be_factory*> (this);
95 case AST_Decl::NT_finder:
96 return dynamic_cast<be_finder*> (this);
97 default:
98 return nullptr;
102 void
103 be_scope::destroy ()
108 be_scope::accept (be_visitor *visitor)
110 return visitor->visit_scope (this);