public class CountEmitter extends PackEmitter
chunks, name, out
Modifier | Constructor and Description |
---|---|
protected |
CountEmitter(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(String name)
name
- name of the generated arraypublic void emitUnpack()
emitUnpack
in class PackEmitter
PackEmitter.emitUnpack()
public void setValTranslation(int i)
i
- amount the value will be translated by.
Example: i = 1
allows values in [-1, 0xFFFE].public void emit(int count, int value)
translate
value.count
- value
- setValTranslation(int)
Copyright © 1998–2016. All rights reserved.