bool
ServiceEntity::hasPort(const PortEntry * aPort)
{
    ODL_OBJENTER(); //####
    bool result = false;
    
    for (int ii = 0, mm = _panel.getNumPorts(); mm > ii; ++ii)
    {
        PortEntry * anEntry = _panel.getPort(ii);
        
        if (aPort == anEntry)
        {
            result = true;
            break;
        }
        
    }
    ODL_OBJEXIT_B(result); //####
    return result;
} // ServiceEntity::hasPort
示例#2
0
bool
nImO::Array::deeplyEqualTo
    (const nImO::Value &    other)
    const
{
    ODL_OBJENTER(); //####
    ODL_P1("other = ", &other); //####
    bool    result = (&other == this);

    if (! result)
    {
        const Array *   otherPtr = other.asArray();

        if (otherPtr && (size() == otherPtr->size()))
        {
            const_iterator  thisWalker(inherited2::begin());
            const_iterator  otherWalker(otherPtr->inherited2::begin());

            for (result = true; result && (thisWalker != inherited2::end()); ++thisWalker, ++otherWalker)
            {
                SpValue thisValue(*thisWalker);
                SpValue otherValue(*otherWalker);

                if ((nullptr != thisValue) && (nullptr != otherValue))
                {
                    result = thisValue->deeplyEqualTo(*otherValue);
                }
                else
                {
                    result = false;
                }
            }
        }
    }
    ODL_OBJEXIT_B(result); //####
    return result;
} // nImO::Array::deeplyEqualTo