Function getUInt16

Synopsis

#include <include/bitpropvariant.hpp>

uint16_t getUInt16() const

Description

Return
the 16-bit unsigned integer value of this variant (it throws an exception if the variant is not an 8 or 16-bit unsigned integer).

Source

Lines 255-264 in src/bitpropvariant.cpp. Line 436 in include/bitpropvariant.hpp.

uint16_t BitPropVariant::getUInt16() const {
    switch ( vt ) {
        case VT_UI1:
            return bVal;
        case VT_UI2:
            return uiVal;
        default:
            throw BitException( "BitPropVariant is not a 16-bits unsigned integer" );
    }
}





Add Discussion as Guest

Log in