3 #include "ComposedNode.hxx"
6 using namespace YACS::ENGINE;
9 InPort::InPort(const InPort& other, Node *newHelder):
10 DataPort(other,newHelder),Port(other,newHelder)
14 InPort::InPort(const std::string& name, Node *node, TypeCode* type):
15 DataPort(name,node,type),Port(node)
23 //! Returns number of \b physical backlinks \b NOT number of user backlinks.
24 int InPort::edGetNumberOfLinks() const
26 return _backLinks.size();
29 void InPort::edRemoveAllLinksLinkedWithMe() throw(Exception)
31 set<OutPort *> temp(_backLinks);//edRemoveLink called after causes invalidation of set iterator.
32 for(set<OutPort *>::iterator iter=temp.begin();iter!=temp.end();iter++)
34 set<OutPort *> trueBackOutputs;
35 (*iter)->getAllRepresented(trueBackOutputs);
36 for(set<OutPort *>::iterator iter2=trueBackOutputs.begin();iter2!=trueBackOutputs.end();iter2++)
37 _node->getRootNode()->edRemoveLink(*iter2,this);
43 //! Returns \b physical backlinks \b NOT user backlinks.
44 std::set<OutPort *> InPort::edSetOutPort() const
49 void InPort::edNotifyReferencedBy(OutPort *fromPort)
51 _backLinks.insert(fromPort);
55 void InPort::edNotifyDereferencedBy(OutPort *fromPort)
57 _backLinks.erase(fromPort);
61 void InPort::getAllRepresentants(std::set<InPort *>& repr) const
63 repr.insert((InPort *)this);