-
-
Notifications
You must be signed in to change notification settings - Fork 119
BitPropVariant
The BitPropVariant struct is a light extension to the WinAPI PROPVARIANT struct providing useful getters.
#include <bit7z/bitpropvariant.hpp>
inherits from PROPVARIANT.
Return type | Name |
---|---|
BitPropVariant() | |
BitPropVariant( BitPropVariant&& other ) noexcept | |
BitPropVariant( bool value ) noexcept | |
BitPropVariant( const BitPropVariant& other ) | |
BitPropVariant( const std::wstring& value ) | |
BitPropVariant( const wchar_t* value ) | |
BitPropVariant( FILETIME value ) noexcept | |
BitPropVariant( int16_t value ) noexcept | |
BitPropVariant( int32_t value ) noexcept | |
BitPropVariant( int64_t value ) noexcept | |
BitPropVariant( int8_t value ) noexcept | |
BitPropVariant( uint16_t value ) noexcept | |
BitPropVariant( uint32_t value ) noexcept | |
BitPropVariant( uint64_t value ) noexcept | |
BitPropVariant( uint8_t value ) noexcept | |
~BitPropVariant() | |
void | clear() noexcept |
bool | getBool() const |
FILETIME | getFileTime() const |
int16_t | getInt16() const |
int32_t | getInt32() const |
int64_t | getInt64() const |
int8_t | getInt8() const |
native_string | getNativeString() const |
tstring | getString() const |
time_type | getTimePoint() const |
uint16_t | getUInt16() const |
uint32_t | getUInt32() const |
uint64_t | getUInt64() const |
uint8_t | getUInt8() const |
bool | isBool() const noexcept |
bool | isEmpty() const noexcept |
bool | isFileTime() const noexcept |
bool | isInt16() const noexcept |
bool | isInt32() const noexcept |
bool | isInt64() const noexcept |
bool | isInt8() const noexcept |
bool | isString() const noexcept |
bool | isUInt16() const noexcept |
bool | isUInt32() const noexcept |
bool | isUInt64() const noexcept |
bool | isUInt8() const noexcept |
BitPropVariant & | operator=( BitPropVariant&& other ) noexcept |
BitPropVariant & | operator=( const BitPropVariant& other ) |
BitPropVariant & | operator=( const T& value ) |
tstring | toString() const |
BitPropVariantType | type() const |
Constructs an empty BitPropVariant object.
BitPropVariant( BitPropVariant&& other ) noexcept
Move constructs this BitPropVariant from another one.
Parameters:
- other: the variant to be moved.
Constructs a boolean BitPropVariant.
Parameters:
- value: the bool value of the BitPropVariant
BitPropVariant( const BitPropVariant& other )
Copy constructs this BitPropVariant from another one.
Parameters:
- other: the variant to be copied.
BitPropVariant( const std::wstring& value )
Constructs a string BitPropVariant from a wstring.
Parameters:
- value: the wstring value of the BitPropVariant
Constructs a string BitPropVariant from a null-terminated C wide string.
Parameters:
- value: the null-terminated C wide string value of the BitPropVariant
Constructs a FILETIME BitPropVariant.
Parameters:
- value: the FILETIME value of the BitPropVariant
Constructs a 16-bit integer BitPropVariant.
Parameters:
- value: the int16_t value of the BitPropVariant
Constructs a 32-bit integer BitPropVariant.
Parameters:
- value: the int32_t value of the BitPropVariant
Constructs a 64-bit integer BitPropVariant.
Parameters:
- value: the int64_t value of the BitPropVariant
Constructs an 8-bit integer BitPropVariant.
Parameters:
- value: the int8_t value of the BitPropVariant
Constructs a 16-bit unsigned integer BitPropVariant.
Parameters:
- value: the uint16_t value of the BitPropVariant
Constructs a 32-bit unsigned integer BitPropVariant.
Parameters:
- value: the uint32_t value of the BitPropVariant
Constructs a 64-bit unsigned integer BitPropVariant.
Parameters:
- value: the uint64_t value of the BitPropVariant
Constructs an 8-bit unsigned integer BitPropVariant.
Parameters:
- value: the uint8_t value of the BitPropVariant
BitPropVariant destructor.
Note
This is not virtual to maintain the same memory layout of the base struct!
Clears the current value of the variant object.
Returns the boolean value of this variant (it throws an exception if the variant is not a boolean value).
Returns the FILETIME value of this variant (it throws an exception if the variant is not a filetime).
Returns the 16-bit integer value of this variant (it throws an exception if the variant is not an 8 or 16-bit integer).
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).
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).
Returns the 8-bit integer value of this variant (it throws an exception if the variant is not an 8-bit integer).
native_string getNativeString() const
Returns the native string value of this variant (it throws an exception if the variant is not a string).
tstring getString() const
Returns the string value of this variant (it throws an exception if the variant is not a string).
time_type getTimePoint() const
Returns the FILETIME value of this variant converted to std::time_point (it throws an exception if the variant is not a filetime).
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).
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).
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).
Returns the 8-bit unsigned integer value of this variant (it throws an exception if the variant is not an 8-bit unsigned integer).
Returns a boolean value indicating whether the variant is a boolean value.
Returns a boolean value indicating whether the variant is empty.
Returns a boolean value indicating whether the variant is a FILETIME structure.
Returns a boolean value indicating whether the variant is an 8 or 16-bit integer.
Returns a boolean value indicating whether the variant is an 8, 16 or 32-bit integer.
Returns a boolean value indicating whether the variant is an 8, 16, 32 or 64-bit integer.
Returns a boolean value indicating whether the variant is an 8-bit integer.
Returns a boolean value indicating whether the variant is a string.
Returns a boolean value indicating whether the variant is an 8 or 16-bit unsigned integer.
Returns a boolean value indicating whether the variant is an 8, 16 or 32-bit unsigned integer.
Returns a boolean value indicating whether the variant is an 8, 16, 32 or 64-bit unsigned integer.
Returns a boolean value indicating whether the variant is an 8-bit unsigned integer.
BitPropVariant & operator=( BitPropVariant&& other ) noexcept
Move assignment operator.
Parameters:
- other: the variant to be moved.
Returns a reference to *this object (with the moved values from other).
BitPropVariant & operator=( const BitPropVariant& other )
Copy assignment operator.
Parameters:
- other: the variant to be copied.
Returns a reference to *this object (with the copied values from other).
BitPropVariant & operator=( const T& value )
Assignment operator.
Note
this will work only for T types for which a BitPropVariant constructor is defined!
Parameters:
- value: the value to be assigned to the object
Returns a reference to *this object having the value as new variant value
tstring toString() const
Returns the value of this variant converted from any supported type to std::wstring.
BitPropVariantType type() const
Returns the BitPropVariantType of this variant.
Copyright © 2014 - 2024 Riccardo Ostani (@rikyoz)
- Bit7zLibrary
- BitArchiveEditor
- BitArchiveReader
- BitArchiveWriter
- BitException
- BitFileCompressor
- BitFileExtractor
- BitMemCompressor
- BitMemExtractor
- BitStreamCompressor
- BitStreamExtractor
- BitInFormat