Struct CompressParameter#

Struct Documentation#

struct CompressParameter#

Simple variant type used for the compression-parameters-property-bag.

Public Types

enum class Type#

Values that represent the type represented by this variant.

Values:

enumerator Invalid#

An enum constant representing the ‘invalid’ type (so this instance has no value).

enumerator Int32#

An enum constant representing the ‘int32’ type.

enumerator Uint32#

An enum constant representing the ‘uint32’ type.

enumerator Boolean#

An enum constant representing the ‘boolean’ type.

Public Functions

inline CompressParameter()#

Default constructor - setting the variant to ‘invalid’.

inline explicit CompressParameter(std::int32_t v)#

Constructor for initializing the ‘int32’ type.

Parameters:

v – The value to set the variant to.

inline explicit CompressParameter(std::uint32_t v)#

Constructor for initializing the ‘uint32’ type.

Parameters:

v – The value to set the variant to.

inline explicit CompressParameter(bool v)#

Constructor for initializing the ‘bool’ type.

Parameters:

v – The value to set the variant to.

inline void SetInt32(std::int32_t v)#

Sets the type of the variant to “int32” and the value to the specified value.

Parameters:

v – The value to be set.

inline void SetUInt32(std::uint32_t v)#

Sets the type of the variant to “uint32” and the value to the specified value.

Parameters:

v – The value to be set.

inline void SetBoolean(bool v)#

Sets the type of the variant to “boolean” and the value to the specified value.

Parameters:

v – The value to be set.

inline Type GetType() const#

Gets the type which is represented by the variant.

Returns:

The type.

inline std::int32_t GetInt32() const#

If the type of the variant is “Int32”, then this value is returned. Otherwise, an exception (of type “runtime_error”) is thrown.

Returns:

The value of the variant (of type “Int32”).

inline std::uint32_t GetUInt32() const#

If the type of the variant is “Uint32”, then this value is returned. Otherwise, an exception (of type “runtime_error”) is thrown.

Returns:

The value of the variant (of type “Uint32”).

inline bool GetBoolean() const#

If the type of the variant is “Boolean”, then this value is returned. Otherwise, an exception (of type “runtime_error”) is thrown.

Returns:

The value of the variant (of type “Boolean”).

Public Members

std::int32_t int32Value#
std::uint32_t uint32Value#
bool boolValue#