+ //==================================================================
+ void Connection::Check() const
+ {
+ bbtkMessage("debug",1,"** Checking Connection "<<(void*)this<<" ["
+ <<GetFullName()<<"]"
+ <<std::endl);
+ if (mFrom==0)
+ {
+ bbtkMessage("debug",2," - From = 0"<<std::endl);
+ }
+ else
+ {
+ bbtkMessage("debug",2," - From : "<<mFrom->bbGetName()<<std::endl);
+ if (!mFrom->bbHasOutput(mOutput))
+ {
+ bbtkError("** Checking Connection "<<(void*)this
+ <<" ["<<GetFullName()<<"] : "
+ << mFrom->bbGetName()<<" does not have output '"
+ <<mOutput<<"'");
+ }
+ bbtkMessage("debug",2," - From : Output '"<<mOutput<<"' exists"<<std::endl);
+ BlackBox::OutputConnectorMapType::const_iterator i
+ = mFrom->bbGetOutputConnectorMap().find(mOutput);
+ if (i== mFrom->bbGetOutputConnectorMap().end())
+ {
+ bbtkError("** Checking Connection "<<(void*)this
+ <<" ["<<GetFullName()<<"] : "
+ <<mFrom->bbGetName()<<" output '"
+ <<mOutput<<"' is not in OutputConnectorMap");
+ }
+ bbtkMessage("debug",2," - From : Output '"<<mOutput
+ <<"' is in OutputConnectorMap"<<std::endl);
+
+ std::vector< Connection* >::const_iterator j;
+ /*
+ for (j = i->second->GetConnectionVector().begin();
+ j != i->second->GetConnectionVector().end();
+ ++j)
+ {
+ if ((*j)==this) break;
+ }
+ */
+ j = find(i->second->GetConnectionVector().begin(),
+ i->second->GetConnectionVector().end(),
+ this);
+
+ if (j==i->second->GetConnectionVector().end())
+ {
+ bbtkError("** Checking Connection "<<(void*)this
+ <<" ["<<GetFullName()<<"] : "
+ <<" OutputConnector '"
+ <<mOutput<<"' of "<<mFrom->bbGetName()
+ <<" does not point to this connection");
+
+ }
+ bbtkMessage("debug",2," - From : This connection is in OutputConnector connection vector"<<std::endl);
+ bbtkMessage("debug",2," * Box from : Check successfull"<<std::endl);
+
+ }
+
+ if (mTo==0)
+ {
+ bbtkMessage("debug",2," - To = 0"<<std::endl);
+ }
+ else
+ {
+ bbtkMessage("debug",2," - To : "<<mTo->bbGetName()<<std::endl);
+ // std::cout << mTo << std::endl;
+ // std::cout << mTo->bbGetDescriptor() << std::endl;
+ // std::cout << mTo->bbGetDescriptor()->GetTypeName() << std::endl;
+ // mTo->bbGetName();
+ bbtkMessage("debug",2," - To : "<<mTo->bbGetName()<<std::endl);
+ if (!mTo->bbHasInput(mInput))
+ {
+ bbtkError("** Checking Connection "<<(void*)this
+ <<" ["<<GetFullName()<<"] : "
+ <<mTo->bbGetName()<<" does not have input '"
+ <<mInput<<"'");
+ }
+ bbtkMessage("debug",2," - To : Input '"<<mInput<<"' exists"<<std::endl);
+ BlackBox::InputConnectorMapType::const_iterator i
+ = mTo->bbGetInputConnectorMap().find(mInput);
+ if (i== mTo->bbGetInputConnectorMap().end())
+ {
+ bbtkError("** Checking Connection "<<(void*)this
+ <<" ["<<GetFullName()<<"] : "
+ <<mTo->bbGetName()<<" input '"
+ <<mInput<<"' is not in InputConnectorMap");
+ }
+ bbtkMessage("debug",2," - To : Input '"<<mInput
+ <<"' is in InputConnectorMap"<<std::endl);
+
+ if (i->second->GetConnection()==0)
+ {
+ bbtkError("** Checking Connection "<<(void*)this
+ <<" ["<<GetFullName()<<"] : "
+ <<" InputConnector '"
+ <<mInput<<"' of "<<mTo->bbGetName()
+ <<" does not point to this connection");
+
+ }
+ bbtkMessage("debug",2," - To : This connection is in InputConnector connection vector"<<std::endl);
+ bbtkMessage("debug",2," * Box to : Check successfull"<<std::endl);
+
+ }
+ }
+ //==================================================================
+ //==========================================================================
+ std::string Connection::GetObjectName() const
+ {
+ std::string s("Connection '");
+ s += GetFullName();
+ s += "'";
+ return s;
+ }
+ //==========================================================================
+
+ //==========================================================================
+ std::string Connection::GetObjectInfo() const
+ {
+ std::stringstream i;
+ return i.str();
+ }
+ //==========================================================================