Function getBool

Synopsis

#include <include/bitpropvariant.hpp>

bool getBool() const

Description

Return
the boolean value of this variant (it throws an expcetion if the variant is not a boolean).

Source

Lines 231-236 in src/bitpropvariant.cpp. Line 418 in include/bitpropvariant.hpp.

bool BitPropVariant::getBool() const {
    if ( vt != VT_BOOL ) {
        throw BitException( "BitPropVariant is not a bool" );
    }
    return boolVal != VARIANT_FALSE; //simply returning boolVal should work but this prevents some compiler warnings
}





Add Discussion as Guest

Log in