package skadistats.clarity.examples.simple;

import com.dota2.proto.Networkbasetypes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import skadistats.clarity.two.processor.reader.OnMessage;
import skadistats.clarity.two.processor.runner.Context;
import skadistats.clarity.two.processor.runner.Runner;
import skadistats.clarity.two.processor.sendtables.UsesDTClasses;

import java.io.FileInputStream;

public class Main {

    @UsesDTClasses
    public static class Test {

        @OnMessage(Networkbasetypes.CNETMsg_Tick.class)
        public void doIt(Context ctx, Networkbasetypes.CNETMsg_Tick m) {
            System.out.println(ctx.getTick() + m.toString());
        }
    }

    public static void main(String[] args) throws Exception {

        long tStart = System.currentTimeMillis();

        Logger log = LoggerFactory.getLogger("simple");

        new Runner().runWith(new FileInputStream(args[0]), new Test());

        long tMatch = System.currentTimeMillis() - tStart;
        log.info("total time taken: {}s", (tMatch) / 1000.0);
        
    }

}

@@ -136,16 +136,79 @@
 actory;%0A
+import skadistats.clarity.two.processor.entities.UsesEntities;%0A
 import s
@@ -257,16 +257,16 @@
 essage;%0A
-
 import s
@@ -371,74 +371,8 @@
 ner;
-%0Aimport skadistats.clarity.two.processor.sendtables.UsesDTClasses;
 %0A%0Aim
@@ -436,15 +436,14 @@
 Uses
-DTClass
+Entiti
 es%0A 

entity decoding