QRDataModeInterface
in
Specifies the methods reqired for the data modules (Number, Alphanum, Byte and Kanji)
Table of Contents
Constants
- DATAMODE = -1
- the current data mode: Number, Alphanum, Kanji, Hanzi, Byte, ECI
Methods
- convertEncoding() : string
- encoding conversion helper
- decodeSegment() : string
- reads a segment from the BitBuffer and decodes in the current data mode
- getLengthInBits() : int
- retruns the length in bits of the data string
- validateString() : bool
- checks if the given string qualifies for the encoder module
- write() : static
- writes the actual data string to the BitBuffer, uses the given version to determine the length bits
Constants
DATAMODE
the current data mode: Number, Alphanum, Kanji, Hanzi, Byte, ECI
public
int
DATAMODE
= -1
Note: do not call this constant from the interface, but rather from one of the child classes
Tags
Methods
convertEncoding()
encoding conversion helper
public
static convertEncoding(string $string) : string
Parameters
- $string : string
Tags
Return values
stringdecodeSegment()
reads a segment from the BitBuffer and decodes in the current data mode
public
static decodeSegment(BitBuffer $bitBuffer, int $versionNumber) : string
Parameters
- $bitBuffer : BitBuffer
- $versionNumber : int
Return values
stringgetLengthInBits()
retruns the length in bits of the data string
public
getLengthInBits() : int
Return values
intvalidateString()
checks if the given string qualifies for the encoder module
public
static validateString(string $string) : bool
Parameters
- $string : string
Return values
boolwrite()
writes the actual data string to the BitBuffer, uses the given version to determine the length bits
public
write(BitBuffer $bitBuffer, int $versionNumber) : static
Parameters
- $bitBuffer : BitBuffer
- $versionNumber : int