Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / TAO_IDL / ast / ast_finder.cpp
blob5945fdb228cd591cb9ff16bcb14a1896f81b47b2
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 (void)
23 void
24 AST_Finder::destroy (void)
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 = 0;
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);
62 IMPL_NARROW_FROM_DECL(AST_Finder)
63 IMPL_NARROW_FROM_SCOPE(AST_Finder)