src/modules/network/netdev.cpp
bool Net::equal_to(const IDevPtr& dev) const
{
    if (boost::dynamic_pointer_cast<Net, IDev>(dev) == NULL)
    {
        // not net dev
        return false;
    }

    if (hasParam(NAME) == false ||
        dev->hasParam(NAME) == false)
    {
        // don't have the name param
        return false;
    }

    if (getStringParam(NAME) == dev->getStringParam(NAME))
    {
        // name does not match
        return true;
    }
    return false;
}
// Tests equalence of two devs
// we get equalence by the dev's name
Tests equalence of two devs
we get equalence by the dev's name
Tests equalence of two devs we get equalence by the dev ' s name
bool Net::equal_to(const IDevPtr& dev) const
{
    if (boost::dynamic_pointer_cast<Net, IDev>(dev) == NULL)
    {
        return false;
    }
    if (hasParam(NAME) == false ||
        dev->hasParam(NAME) == false)
    {
        return false;
    }
    if (getStringParam(NAME) == dev->getStringParam(NAME))
    {
        return true;
    }
    return false;
}
bool Net :: equal_to ( const IDevPtr & dev ) const { if ( boost :: dynamic_pointer_cast < Net , IDev > ( dev ) == NULL ) { return false ; } if ( hasParam ( NAME ) == false || dev -> hasParam ( NAME ) == false ) { return false ; } if ( getStringParam ( NAME ) == dev -> getStringParam ( NAME ) ) { return true ; } return false ; }
Tests equalence of two devs
we get equalence by the dev's name
Tests equalence of two devs we get equalence by the dev ' s name
// not net dev // don't have the name param // name does not match