package pw.koj.jetstreem.core;

public class Streem {
    private TaskMode mode;
    private StrmQueue queue;
    private char flags;
    private StrmFunc startFunc;
    private StrmFunc closeFunc;
    private Void data;
    private Streem dst;
    private Streem nextd;

    public Streem(TaskMode mode, StrmQueue queue, StrmFunc startFunc, StrmFunc closeFunc, Void data) {
        this.mode = mode;
        this.queue = queue;
        this.startFunc = startFunc;
        this.closeFunc = closeFunc;
        this.data = data;
        this.dst = null;
        this.nextd = null;
        this.flags = 0;
    }

    public TaskMode mode() {
        return this.mode;
    }

    public StrmQueue queue() {
        return this.queue;
    }

    public char flags() {
        return this.flags;
    }

    public StrmFunc startFunc() {
        return this.startFunc;
    }

    public StrmFunc closeFunc() {
        return this.closeFunc;
    }

    public Void data() {
        return this.data;
    }

    public Streem dst() {
        return this.dst;
    }

    public Streem nextd() {
        return this.nextd;
    }

}


@@ -1112,11 +1112,403 @@
 %0A    %7D%0A%0A
+    public void emit(Void data, StrmFunc func) %7B%0A        Streem d = this.dst;%0A%0A        while (d != null) %7B%0A            taskPush(d, d.startFunc(), data);%0A            d = d.nextd();%0A        %7D%0A        if (func != null) %7B%0A            taskPush(this, func, null);%0A        %7D%0A    %7D%0A%0A    private void taskPush(Streem strm, StrmFunc func, Void data) %7B%0A        this.queue.push(strm, func, data);%0A    %7D%0A%0A
 %7D%0A%0A

add emit() and taskPush() to class Streem