1 #include "DataPort.hxx"
2 #include "TypeCode.hxx"
5 using namespace YACS::ENGINE;
8 const char DataPort::NAME[]="DataPort";
15 DataPort::DataPort(const std::string& name, Node *node, TypeCode* type):Port(node),_name(name),_type(type)
20 DataPort::DataPort(const DataPort& other, Node *newHelder):Port(other,newHelder),_name(other._name),_type(other._type)
25 void DataPort::edSetType(TypeCode* type)
34 string DataPort::getNameOfTypeOfCurrentInstance() const
39 bool DataPort::isDifferentTypeOf(const DataPort *other) const
41 return getTypeOfChannel()!=other->getTypeOfChannel();
45 * If in historyOfLink different type of Port are detected : The first one (by starting from the end of 'historyOfLink')
46 * is returned. Else 0 is returned if they are all of the same type.
48 DataPort *DataPort::isCrossingType(const std::vector<DataPort *>& historyOfLink)
50 vector<DataPort *>::const_reverse_iterator iter=historyOfLink.rbegin()+1;
51 const DataPort *base=historyOfLink.back();
52 for(;iter!=historyOfLink.rend();iter++)
53 if(base->isDifferentTypeOf(*iter))