bit7z 4.0.0
A C++ library for interfacing with the 7-zip shared libs.
Loading...
Searching...
No Matches
BitPropVariant Struct Referencefinal

The BitPropVariant struct is a light extension to the WinAPI PROPVARIANT struct providing useful getters. More...

#include <bit7z/bitpropvariant.hpp>

Inherits PROPVARIANT.

Public Member Functions

 BitPropVariant ()
 Constructs an empty BitPropVariant object.
 
 BitPropVariant (BitPropVariant &&other) noexcept
 Move constructs this BitPropVariant from another one.
 
 BitPropVariant (bool value) noexcept
 Constructs a boolean BitPropVariant.
 
 BitPropVariant (const BitPropVariant &other)
 Copy constructs this BitPropVariant from another one.
 
 BitPropVariant (const std::wstring &value)
 Constructs a string BitPropVariant from a wstring.
 
 BitPropVariant (const wchar_t *value)
 Constructs a string BitPropVariant from a null-terminated C wide string.
 
 BitPropVariant (FILETIME value) noexcept
 Constructs a FILETIME BitPropVariant.
 
 BitPropVariant (int16_t value) noexcept
 Constructs a 16-bit integer BitPropVariant.
 
 BitPropVariant (int32_t value) noexcept
 Constructs a 32-bit integer BitPropVariant.
 
 BitPropVariant (int64_t value) noexcept
 Constructs a 64-bit integer BitPropVariant.
 
 BitPropVariant (int8_t value) noexcept
 Constructs an 8-bit integer BitPropVariant.
 
 BitPropVariant (uint16_t value) noexcept
 Constructs a 16-bit unsigned integer BitPropVariant.
 
 BitPropVariant (uint32_t value) noexcept
 Constructs a 32-bit unsigned integer BitPropVariant.
 
 BitPropVariant (uint64_t value) noexcept
 Constructs a 64-bit unsigned integer BitPropVariant.
 
 BitPropVariant (uint8_t value) noexcept
 Constructs an 8-bit unsigned integer BitPropVariant.
 
 ~BitPropVariant ()
 BitPropVariant destructor.
 
void clear () noexcept
 Clears the current value of the variant object.
 
auto getBool () const -> bool
 
auto getFileTime () const -> FILETIME
 
auto getInt16 () const -> int16_t
 
auto getInt32 () const -> int32_t
 
auto getInt64 () const -> int64_t
 
auto getInt8 () const -> int8_t
 
auto getNativeString () const -> native_string
 
auto getString () const -> tstring
 
auto getTimePoint () const -> time_type
 
auto getUInt16 () const -> uint16_t
 
auto getUInt32 () const -> uint32_t
 
auto getUInt64 () const -> uint64_t
 
auto getUInt8 () const -> uint8_t
 
auto isBool () const noexcept -> bool
 
auto isEmpty () const noexcept -> bool
 
auto isFileTime () const noexcept -> bool
 
auto isInt16 () const noexcept -> bool
 
auto isInt32 () const noexcept -> bool
 
auto isInt64 () const noexcept -> bool
 
auto isInt8 () const noexcept -> bool
 
auto isString () const noexcept -> bool
 
auto isUInt16 () const noexcept -> bool
 
auto isUInt32 () const noexcept -> bool
 
auto isUInt64 () const noexcept -> bool
 
auto isUInt8 () const noexcept -> bool
 
auto operator= (BitPropVariant &&other) noexcept -> BitPropVariant &
 Move assignment operator.
 
auto operator= (const BitPropVariant &other) -> BitPropVariant &
 Copy assignment operator.
 
template<typename T >
auto operator= (const T &value) noexcept(std::is_integral< T >::value) -> BitPropVariant &
 Assignment operator.
 
auto toString () const -> tstring
 
auto type () const -> BitPropVariantType
 

Detailed Description

The BitPropVariant struct is a light extension to the WinAPI PROPVARIANT struct providing useful getters.

Constructor & Destructor Documentation

◆ BitPropVariant() [1/15]

Constructs an empty BitPropVariant object.

◆ BitPropVariant() [2/15]

BitPropVariant ( const BitPropVariant other)

Copy constructs this BitPropVariant from another one.

Parameters
otherthe variant to be copied.

◆ BitPropVariant() [3/15]

BitPropVariant ( BitPropVariant &&  other)
noexcept

Move constructs this BitPropVariant from another one.

Parameters
otherthe variant to be moved.

◆ BitPropVariant() [4/15]

BitPropVariant ( bool  value)
explicitnoexcept

Constructs a boolean BitPropVariant.

Parameters
valuethe bool value of the BitPropVariant

◆ BitPropVariant() [5/15]

BitPropVariant ( const wchar_t *  value)
explicit

Constructs a string BitPropVariant from a null-terminated C wide string.

Parameters
valuethe null-terminated C wide string value of the BitPropVariant

◆ BitPropVariant() [6/15]

BitPropVariant ( const std::wstring value)
explicit

Constructs a string BitPropVariant from a wstring.

Parameters
valuethe wstring value of the BitPropVariant

◆ BitPropVariant() [7/15]

BitPropVariant ( uint8_t  value)
explicitnoexcept

Constructs an 8-bit unsigned integer BitPropVariant.

Parameters
valuethe uint8_t value of the BitPropVariant

◆ BitPropVariant() [8/15]

BitPropVariant ( uint16_t  value)
explicitnoexcept

Constructs a 16-bit unsigned integer BitPropVariant.

Parameters
valuethe uint16_t value of the BitPropVariant

◆ BitPropVariant() [9/15]

BitPropVariant ( uint32_t  value)
explicitnoexcept

Constructs a 32-bit unsigned integer BitPropVariant.

Parameters
valuethe uint32_t value of the BitPropVariant

◆ BitPropVariant() [10/15]

BitPropVariant ( uint64_t  value)
explicitnoexcept

Constructs a 64-bit unsigned integer BitPropVariant.

Parameters
valuethe uint64_t value of the BitPropVariant

◆ BitPropVariant() [11/15]

BitPropVariant ( int8_t  value)
explicitnoexcept

Constructs an 8-bit integer BitPropVariant.

Parameters
valuethe int8_t value of the BitPropVariant

◆ BitPropVariant() [12/15]

BitPropVariant ( int16_t  value)
explicitnoexcept

Constructs a 16-bit integer BitPropVariant.

Parameters
valuethe int16_t value of the BitPropVariant

◆ BitPropVariant() [13/15]

BitPropVariant ( int32_t  value)
explicitnoexcept

Constructs a 32-bit integer BitPropVariant.

Parameters
valuethe int32_t value of the BitPropVariant

◆ BitPropVariant() [14/15]

BitPropVariant ( int64_t  value)
explicitnoexcept

Constructs a 64-bit integer BitPropVariant.

Parameters
valuethe int64_t value of the BitPropVariant

◆ BitPropVariant() [15/15]

BitPropVariant ( FILETIME  value)
explicitnoexcept

Constructs a FILETIME BitPropVariant.

Parameters
valuethe FILETIME value of the BitPropVariant

◆ ~BitPropVariant()

BitPropVariant destructor.

Note
This is not virtual to maintain the same memory layout of the base struct!

Member Function Documentation

◆ clear()

void clear ( )
noexcept

Clears the current value of the variant object.

◆ getBool()

auto getBool ( ) const -> bool
Returns
the boolean value of this variant (it throws an exception if the variant is not a boolean value).

◆ getFileTime()

auto getFileTime ( ) const -> FILETIME
Returns
the FILETIME value of this variant (it throws an exception if the variant is not a filetime).

◆ getInt16()

auto getInt16 ( ) const -> int16_t
Returns
the 16-bit integer value of this variant (it throws an exception if the variant is not an 8 or 16-bit integer).

◆ getInt32()

auto getInt32 ( ) const -> int32_t
Returns
the 32-bit integer value of this variant (it throws an exception if the variant is not an 8, 16 or 32-bit integer).

◆ getInt64()

auto getInt64 ( ) const -> int64_t
Returns
the 64-bit integer value of this variant (it throws an exception if the variant is not an 8, 16, 32 or 64-bit integer).

◆ getInt8()

auto getInt8 ( ) const -> int8_t
Returns
the 8-bit integer value of this variant (it throws an exception if the variant is not an 8-bit integer).

◆ getNativeString()

auto getNativeString ( ) const -> native_string
Returns
the native string value of this variant (it throws an exception if the variant is not a string).

◆ getString()

auto getString ( ) const -> tstring
Returns
the string value of this variant (it throws an exception if the variant is not a string).

◆ getTimePoint()

auto getTimePoint ( ) const -> time_type
Returns
the FILETIME value of this variant converted to std::time_point (it throws an exception if the variant is not a filetime).

◆ getUInt16()

auto getUInt16 ( ) const -> uint16_t
Returns
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).

◆ getUInt32()

auto getUInt32 ( ) const -> uint32_t
Returns
the 32-bit unsigned integer value of this variant (it throws an exception if the variant is not an 8, 16 or 32-bit unsigned integer).

◆ getUInt64()

auto getUInt64 ( ) const -> uint64_t
Returns
the 64-bit unsigned integer value of this variant (it throws an exception if the variant is not an 8, 16, 32 or 64-bit unsigned integer).

◆ getUInt8()

auto getUInt8 ( ) const -> uint8_t
Returns
the 8-bit unsigned integer value of this variant (it throws an exception if the variant is not an 8-bit unsigned integer).

◆ isBool()

auto isBool ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is a boolean value.

◆ isEmpty()

auto isEmpty ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is empty.

◆ isFileTime()

auto isFileTime ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is a FILETIME structure.

◆ isInt16()

auto isInt16 ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is an 8 or 16-bit integer.

◆ isInt32()

auto isInt32 ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is an 8, 16 or 32-bit integer.

◆ isInt64()

auto isInt64 ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is an 8, 16, 32 or 64-bit integer.

◆ isInt8()

auto isInt8 ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is an 8-bit integer.

◆ isString()

auto isString ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is a string.

◆ isUInt16()

auto isUInt16 ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is an 8 or 16-bit unsigned integer.

◆ isUInt32()

auto isUInt32 ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is an 8, 16 or 32-bit unsigned integer.

◆ isUInt64()

auto isUInt64 ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is an 8, 16, 32 or 64-bit unsigned integer.

◆ isUInt8()

auto isUInt8 ( ) const -> bool
noexcept
Returns
a boolean value indicating whether the variant is an 8-bit unsigned integer.

◆ operator=() [1/3]

auto operator= ( BitPropVariant &&  other) -> BitPropVariant &
noexcept

Move assignment operator.

Parameters
otherthe variant to be moved.
Returns
a reference to *this object (with the moved values from other).

◆ operator=() [2/3]

auto operator= ( const BitPropVariant other) -> BitPropVariant &

Copy assignment operator.

Parameters
otherthe variant to be copied.
Returns
a reference to *this object (with the copied values from other).

◆ operator=() [3/3]

template<typename T >
auto operator= ( const T &  value) -> BitPropVariant&
inlinenoexcept

Assignment operator.

Note
this will work only for T types for which a BitPropVariant constructor is defined!
Parameters
valuethe value to be assigned to the object
Returns
a reference to *this object having the value as new variant value

◆ toString()

auto toString ( ) const -> tstring
Returns
the value of this variant converted from any supported type to std::wstring.

◆ type()

auto type ( ) const -> BitPropVariantType
Returns
the BitPropVariantType of this variant.

The documentation for this struct was generated from the following file: