예제 #1
0
bool PrioritySingleBitFilter::Apply( BitKey & bit_list,
                                     STEP_CODE_DATA_STRUCT & io_sdc )
{
    bool l_modified = false;

    // Do priority bit.
    for ( size_t i = 0; i < iv_bitList.size(); i++ )
    {
        BitKey l_key = iv_bitList[i];
        if ( bit_list.isSubset(l_key) )
        {
            l_modified = true;
            bit_list = l_key;
            break;
        }
    }
    // Do single bit filter portion.
    if ( !l_modified )
    {
        while ( 1 < bit_list.size() )
        {
            l_modified = true;
            bit_list.removeBit();
        }
    }
    return l_modified;
}
예제 #2
0
bool SingleBitFilter::Apply( BitKey & bit_list, STEP_CODE_DATA_STRUCT & io_sdc )
{
    bool rc = false;
    uint32_t list_length = bit_list.size();
    if( list_length > 1 )
    {
        rc = true;
        while( --list_length )
        {
            bit_list.removeBit();
        }
    }
    return( rc );
}