third_party/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
/**
 * Looks through the given list of media attachments for one with the given parameters
 * and returns it, or NULL if not found. The list is a parameter so that backup lists
 * can be searched as well if needed.
 *
 * @param ll
 * @param aControllerName
 * @param aControllerPort
 * @param aDevice
 * @return
 */
Looks through the given list of media attachments for one with the given parameters
and returns it, or NULL if not found. The list is a parameter so that backup lists
can be searched as well if needed.


Looks through the given list of media attachments for one with the given parameters and returns it or NULL if not found . The list is a parameter so that backup lists can be searched as well if needed .
MediumAttachment *Machine::i_findAttachment(const MediumAttachmentList &ll,
                                            const Utf8Str &aControllerName,
                                            LONG aControllerPort,
                                            LONG aDevice)
{
    for (MediumAttachmentList::const_iterator
         it = ll.begin();
         it != ll.end();
         ++it)
    {
        MediumAttachment *pAttach = *it;
        if (pAttach->i_matches(aControllerName, aControllerPort, aDevice))
            return pAttach;
    }
    return NULL;
}
MediumAttachment * Machine :: i_findAttachment ( const MediumAttachmentList & ll , const Utf8Str & aControllerName , LONG aControllerPort , LONG aDevice ) { for ( MediumAttachmentList :: const_iterator it = ll . begin ( ) ; it != ll . end ( ) ; ++ it ) { MediumAttachment * pAttach = * it ; if ( pAttach -> i_matches ( aControllerName , aControllerPort , aDevice ) ) return pAttach ; } return NULL ; }
Looks through the given list of media attachments for one with the given parameters
 and returns it, or NULL if not found.
Looks through the given list of media attachments for one with the given parameters and returns it or NULL if not found .