// Does our component have an accepting interface sufficing the right criteria (e.g interfaceName)?
if(Count<FirstInterface>::MeetsCriteria(interfaceCriteria)==1)// We use the FirstInterface only (of each recursion level), thus the count can be 0 or 1
{
// cast always succeeds since we know via the template arguments of the component which InterfaceAcceptors its base classes are.
InterfaceAcceptor<FirstInterface>*acceptIF=this;
// See if the other component has the right interface and try to connect them
if(1==acceptIF->Connect(other))
{
//success. By terminating this function, we assume only one interface listens to interfacename and that one connection with the other component can be made by this name
returnInterfaceStatus::success;
}
else
{
// interfacename was found, but other component doesn't match
returnInterfaceStatus::noprovider;
}
// Make the connection to the other component by this interface and add the number of successes.