third_party/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
/**
 * Returns the number of USB controller instance of the given type.
 *
 * @param enmType                USB controller type.
 */
Returns the number of USB controller instance of the given type.
@param enmType                USB controller type.
Returns the number of USB controller instance of the given type . @param enmType USB controller type .
ULONG Machine::i_getUSBControllerCountByType(USBControllerType_T enmType)
{
    ULONG cCtrls = 0;
    for (USBControllerList::const_iterator
         it = mUSBControllers->begin();
         it != mUSBControllers->end();
         ++it)
    {
        if ((*it)->i_getControllerType() == enmType)
            cCtrls++;
    }
    return cCtrls;
}
ULONG Machine :: i_getUSBControllerCountByType ( USBControllerType_T enmType ) { ULONG cCtrls = 0 ; for ( USBControllerList :: const_iterator it = mUSBControllers -> begin ( ) ; it != mUSBControllers -> end ( ) ; ++ it ) { if ( ( * it ) -> i_getControllerType ( ) == enmType ) cCtrls ++ ; } return cCtrls ; }
Returns the number of USB controller instance of the given type.
Returns the number of USB controller instance of the given type .