public class CountEmitter extends PackEmitter
chunks, name, out
Modifier | Constructor and Description |
---|---|
protected |
CountEmitter(java.lang.String name)
Create a count/value emitter for a specific field.
|
Modifier and Type | Method and Description |
---|---|
void |
emit(int count,
int value)
Emit one count/value pair.
|
void |
emitUnpack()
Emits count/value unpacking code for the generated array.
|
void |
setValTranslation(int i)
Translate all values by given amount.
|
protected CountEmitter(java.lang.String name)
name
- name of the generated arraypublic void emitUnpack()
emitUnpack
in class PackEmitter
PackEmitter.emitUnpack()
public void setValTranslation(int i)
Use to move value interval from [0, 0xFFFF] to something different.
i
- amount the value will be translated by. Example: i = 1
allows values in
[-1, 0xFFFE].public void emit(int count, int value)
Automatically translates value by the translate
value.
count
- a int.value
- a int.setValTranslation(int)
Copyright © 1998–2019. All rights reserved.