Function getInt32

Synopsis

#include <include/bitpropvariant.hpp>

int32_t getInt32() const

Description

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

Source

Lines 318-331 in src/bitpropvariant.cpp. Line 466 in include/bitpropvariant.hpp.

int32_t BitPropVariant::getInt32() const {
    switch ( vt ) {
        case VT_I1:
            return cVal;
        case VT_I2:
            return iVal;
        case VT_INT:
            return intVal;
        case VT_I4:
            return lVal;
        default:
            throw BitException( "BitPropVariant is not a 32-bits integer" );
    }
}





Add Discussion as Guest

Log in