Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / TAO_IDL / ast / ast_finder.cpp
blobf745c3362a5e6020082c00e9beff1a2bf98e65f1
1 #include "ast_finder.h"
2 #include "ast_visitor.h"
4 #include "utl_identifier.h"
6 AST_Decl::NodeType const
7 AST_Finder::NT = AST_Decl::NT_finder;
9 AST_Finder::AST_Finder (UTL_ScopedName *n)
10 : COMMON_Base (true,
11 false), //@@ Always local, never abstract
12 AST_Decl (AST_Decl::NT_finder,
13 n),
14 UTL_Scope (AST_Decl::NT_finder),
15 AST_Factory (n)
19 AST_Finder::~AST_Finder ()
23 void
24 AST_Finder::destroy ()
26 this->AST_Factory::destroy ();
29 // Dump this AST_Factory node to the ostream o.
30 void
31 AST_Finder::dump (ACE_OSTREAM_TYPE &o)
33 AST_Decl *d = nullptr;
35 this->dump_i (o, "finder ");
36 this->local_name ()->dump (o);
37 this->dump_i (o, "(");
39 // Iterator must be explicitly advanced inside the loop.
40 for (UTL_ScopeActiveIterator i (this, IK_decls);
41 !i.is_done ();)
43 d = i.item ();
44 d->dump (o);
45 i.next ();
47 if (!i.is_done())
49 this->dump_i (o, ", ");
53 this->dump_i (o, ")");
56 int
57 AST_Finder::ast_accept (ast_visitor *visitor)
59 return visitor->visit_finder (this);