Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / TAO_IDL / ast / ast_template_module_ref.cpp
blobb12bc7100e686d4894f7a447b9afa984287bbc20
1 #include "ast_template_module_ref.h"
2 #include "ast_template_module.h"
3 #include "ast_visitor.h"
5 #include "utl_strlist.h"
7 AST_Decl::NodeType const
8 AST_Template_Module_Ref::NT = AST_Decl::NT_module;
10 AST_Template_Module_Ref::AST_Template_Module_Ref (
11 UTL_ScopedName *n,
12 AST_Template_Module *ref,
13 UTL_StrList *param_refs)
14 : COMMON_Base (false,
15 false),
16 AST_Decl (AST_Decl::NT_module,
17 n),
18 AST_Field (AST_Decl::NT_module,
19 ref,
20 n),
21 param_refs_ (param_refs),
22 processed_ (false)
26 AST_Template_Module_Ref::~AST_Template_Module_Ref ()
30 AST_Template_Module *
31 AST_Template_Module_Ref::ref () const
33 return dynamic_cast<AST_Template_Module*> (this->field_type ());
36 UTL_StrList *
37 AST_Template_Module_Ref::param_refs () const
39 return this->param_refs_;
42 void
43 AST_Template_Module_Ref::dump (ACE_OSTREAM_TYPE &)
45 // TODO
48 void
49 AST_Template_Module_Ref::destroy ()
51 this->param_refs_->destroy ();
52 delete this->param_refs_;
53 this->param_refs_ = nullptr;
55 this->AST_Field::destroy ();
58 int
59 AST_Template_Module_Ref::ast_accept (ast_visitor *visitor)
61 return visitor->visit_template_module_ref (this);
64 // If IDL module has been created in a scope corresponding
65 // to this node. That's the one we want to match, NOT this
66 // AST_Template_Module_Ref, and it occurs in the scope right
67 // after this node, so we'll match what we're looking for on
68 // the next iteration of the search. So for this immediate
69 // adjustment we return no match.
70 AST_Decl *
71 AST_Template_Module_Ref::adjust_found (
72 bool ignore_fwd,
73 bool /*full_def_only*/)
75 return ignore_fwd ? nullptr : this;
78 bool
79 AST_Template_Module_Ref::processed () const
81 return this->processed_;
84 void
85 AST_Template_Module_Ref::processed (bool val)
87 this->processed_ = val;