diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2009-07-14 12:13:54 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2009-07-14 12:13:54 +0000 |
commit | 00a6d3c7a315423e1e584b3c7a445be1f20ebf41 (patch) | |
tree | 06d38b591fa8a01631a2d64ccf9038f12ed5d48b /TAO/TAO_IDL/ast/ast_component.cpp | |
parent | 618d7a1736bbc5a5f7a07c56cba9a26a5ed8548a (diff) | |
download | ATCD-00a6d3c7a315423e1e584b3c7a445be1f20ebf41.tar.gz |
Tue Jul 14 11:12:09 UTC 2009 William R. Otte <wotte@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/TAO_IDL/ast/ast_component.cpp')
-rw-r--r-- | TAO/TAO_IDL/ast/ast_component.cpp | 66 |
1 files changed, 61 insertions, 5 deletions
diff --git a/TAO/TAO_IDL/ast/ast_component.cpp b/TAO/TAO_IDL/ast/ast_component.cpp index 79aeef67367..c3c884c37b6 100644 --- a/TAO/TAO_IDL/ast/ast_component.cpp +++ b/TAO/TAO_IDL/ast/ast_component.cpp @@ -44,6 +44,10 @@ AST_Component::AST_Component (UTL_ScopedName *n, false), pd_base_component (base_component) { + if (!this->imported ()) + { + idl_global->component_seen_ = true; + } } AST_Component::~AST_Component (void) @@ -143,31 +147,31 @@ AST_Component::n_supports (void) const return this->n_inherits (); } -ACE_Unbounded_Queue<AST_Component::port_description> & +AST_Component::PORTS & AST_Component::provides (void) { return this->pd_provides; } -ACE_Unbounded_Queue<AST_Component::port_description> & +AST_Component::PORTS & AST_Component::uses (void) { return this->pd_uses; } -ACE_Unbounded_Queue<AST_Component::port_description> & +AST_Component::PORTS & AST_Component::emits (void) { return this->pd_emits; } -ACE_Unbounded_Queue<AST_Component::port_description> & +AST_Component::PORTS & AST_Component::publishes (void) { return this->pd_publishes; } -ACE_Unbounded_Queue<AST_Component::port_description> & +AST_Component::PORTS & AST_Component::consumes (void) { return this->pd_consumes; @@ -176,6 +180,58 @@ AST_Component::consumes (void) void AST_Component::destroy (void) { + port_description *pd = 0; + + for (PORTS::ITERATOR i = this->pd_provides.begin (); + !i.done (); + i.advance ()) + { + i.next (pd); + pd->id->destroy (); + delete pd->id; + pd->id = 0; + } + + for (PORTS::ITERATOR i = this->pd_uses.begin (); + !i.done (); + i.advance ()) + { + i.next (pd); + pd->id->destroy (); + delete pd->id; + pd->id = 0; + } + + for (PORTS::ITERATOR i = this->pd_publishes.begin (); + !i.done (); + i.advance ()) + { + i.next (pd); + pd->id->destroy (); + delete pd->id; + pd->id = 0; + } + + for (PORTS::ITERATOR i = this->pd_consumes.begin (); + !i.done (); + i.advance ()) + { + i.next (pd); + pd->id->destroy (); + delete pd->id; + pd->id = 0; + } + + for (PORTS::ITERATOR i = this->pd_emits.begin (); + !i.done (); + i.advance ()) + { + i.next (pd); + pd->id->destroy (); + delete pd->id; + pd->id = 0; + } + this->AST_Interface::destroy (); } |