NDEVR
API Documentation
QrSegment::Modefinal

Describes how a segment's data bits are interpreted. More...

Collaboration diagram for QrSegment::Mode:
[legend]

Public Member Functions

int getModeBits () const
 Returns the mode indicator bits as an unsigned 4-bit value (range 0 to 15).
int numCharCountBits (int ver) const
 Returns the bit width of the character count field for a segment in this mode at the given QR Code version number.

Static Public Attributes

static const Mode ALPHANUMERIC
 Mode for encoding alphanumeric text (0-9, A-Z, space, and select symbols).
static const Mode BYTE
 Mode for encoding arbitrary binary data.
static const Mode ECI
 Mode for Extended Channel Interpretation designators.
static const Mode KANJI
 Mode for encoding Shift JIS Kanji characters.
static const Mode NUMERIC
 Mode for encoding decimal digit strings.

Detailed Description

Describes how a segment's data bits are interpreted.

Each Mode instance is immutable and defines the mode indicator bits and character count bit widths for different QR Code version ranges.

Definition at line 60 of file QRCode.h.

Member Function Documentation

◆ getModeBits()

int QrSegment::Mode::getModeBits ( ) const

Returns the mode indicator bits as an unsigned 4-bit value (range 0 to 15).

Returns
The mode indicator bits.

◆ numCharCountBits()

int QrSegment::Mode::numCharCountBits ( int ver) const

Returns the bit width of the character count field for a segment in this mode at the given QR Code version number.

Parameters
[in]verThe QR Code version number (1 to 40).
Returns
The character count bit width, in the range [0, 16].

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