Function items

Synopsis

#include <include/bitarchiveinfo.hpp>

vector< BitArchiveItem > items() const

Description

Return
a vector of all the archive items as BitArchiveItem objects.

Mentioned in

Source

Lines 55-70 in src/bitarchiveinfo.cpp. Line 106 in include/bitarchiveinfo.hpp.

vector< BitArchiveItem > BitArchiveInfo::items() const {
    vector< BitArchiveItem > result;
    for ( uint32_t i = 0; i < itemsCount(); ++i ) {
        BitArchiveItem item( i );
        for ( uint32_t j = kpidNoProperty; j <= kpidCopyLink; ++j ) {
            // Yeah, I know, I double cast property (here and in getItemProperty), but the code is easier to read!
            auto property = static_cast<BitProperty>( j );
            BitPropVariant property_value = getItemProperty( i, property );
            if ( !property_value.isEmpty() ) {
                item.setProperty( property, property_value );
            }
        }
        result.push_back( item );
    }
    return result;
}





Add Discussion as Guest

Log in