BITS Class Reference

#include <gfx_image_bits.h>

Detailed Description

This class represents the number of bits in a pixel format.

Public Member Functions

MAXON_ATTRIBUTE_FORCE_INLINE BITS ()=default
 
MAXON_ATTRIBUTE_FORCE_INLINE BITS (Int bits)
 
MAXON_ATTRIBUTE_FORCE_INLINE Int Get () const
 
MAXON_ATTRIBUTE_FORCE_INLINE Int GetBytes (Int pixelCnt=1) const
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool operator== (const BITS &other) const
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool operator!= (const BITS &other) const
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool operator< (const BITS &other) const
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool operator<= (const BITS &other) const
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool operator> (const BITS &other) const
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool operator>= (const BITS &other) const
 
MAXON_ATTRIBUTE_FORCE_INLINE BITS operator+ (const BITS &other) const
 
MAXON_ATTRIBUTE_FORCE_INLINE BITS operator- (const BITS &other) const
 
MAXON_ATTRIBUTE_FORCE_INLINE BITS operator* (const BITS &other) const
 
MAXON_ATTRIBUTE_FORCE_INLINE BITS operator* (Int other) const
 
MAXON_ATTRIBUTE_FORCE_INLINE BITS operator/ (const BITS &other) const
 
String ToString (const FormatStatement *formatStatement=nullptr) const
 
HashInt GetHashCode () const
 

Static Public Member Functions

static Result< void > DescribeIO (const DataSerializeInterface &stream)
 

Private Attributes

Int _bits
 

Constructor & Destructor Documentation

◆ BITS() [1/2]

◆ BITS() [2/2]

Sets the bits of the object. BITS(8) means 8 bit.

Member Function Documentation

◆ Get()

Returns the number of bits.

◆ GetBytes()

MAXON_ATTRIBUTE_FORCE_INLINE Int GetBytes ( Int  pixelCnt = 1) const

Returns the number of bytes needed for the bits of this object.

◆ operator==()

MAXON_ATTRIBUTE_FORCE_INLINE Bool operator== ( const BITS other) const

Compares against another BITS value.

◆ operator!=()

MAXON_ATTRIBUTE_FORCE_INLINE Bool operator!= ( const BITS other) const

Compares against another BITS value.

◆ operator<()

MAXON_ATTRIBUTE_FORCE_INLINE Bool operator< ( const BITS other) const

Compares against another BITS value.

◆ operator<=()

MAXON_ATTRIBUTE_FORCE_INLINE Bool operator<= ( const BITS other) const

Compares against another BITS value.

◆ operator>()

MAXON_ATTRIBUTE_FORCE_INLINE Bool operator> ( const BITS other) const

Compares against another BITS value.

◆ operator>=()

MAXON_ATTRIBUTE_FORCE_INLINE Bool operator>= ( const BITS other) const

Compares against another BITS value.

◆ operator+()

MAXON_ATTRIBUTE_FORCE_INLINE BITS operator+ ( const BITS other) const

Add BITS.

◆ operator-()

MAXON_ATTRIBUTE_FORCE_INLINE BITS operator- ( const BITS other) const

Sub BITS.

◆ operator*() [1/2]

MAXON_ATTRIBUTE_FORCE_INLINE BITS operator* ( const BITS other) const

Mul BITS.

◆ operator*() [2/2]

MAXON_ATTRIBUTE_FORCE_INLINE BITS operator* ( Int  other) const

Mul BITS.

◆ operator/()

MAXON_ATTRIBUTE_FORCE_INLINE BITS operator/ ( const BITS other) const

Div BITS.

◆ ToString()

String ToString ( const FormatStatement formatStatement = nullptr) const

Convert BITS into String.

◆ DescribeIO()

static Result<void> DescribeIO ( const DataSerializeInterface stream)
static

Describe all elements of this class for I/O operations.

Parameters
[in]streamThe stream that is used to register the class members.
Returns
OK on success.

◆ GetHashCode()

HashInt GetHashCode ( ) const

Member Data Documentation

◆ _bits

Int _bits
private