Package com.asakusafw.compiler.directio.emitter

Examples of com.asakusafw.compiler.directio.emitter.NamingClassEmitter$Engine


  public static void main(String[] args) {
    System.out.println("Starting Game");
       
       
      
        Engine engine = new Engine("MarioTest");
        Level1 world = new Level1(engine);
        engine.AddRenderComponent(world);

        System.out.println("Finished adding World");
        engine.start();
     }
View Full Code Here


    }

    @Override
    public List<ExternalIoStage> emitEpilogue(IoContext context) throws IOException {
        ModelFactory f = getEnvironment().getModelFactory();
        NamingClassEmitter namingEmitter = new NamingClassEmitter(getEnvironment(), MODULE_NAME);
        OrderingClassEmitter orderingEmitter = new OrderingClassEmitter(getEnvironment(), MODULE_NAME);
        List<Slot> slots = Lists.create();
        for (Output output : context.getOutputs()) {
            DirectFileOutputDescription desc = extract(output.getDescription());
            DataClass dataType = getEnvironment().getDataClasses().load(desc.getModelType());
            List<CompiledResourcePattern> namingInfo =
                OutputPattern.compileResourcePattern(desc.getResourcePattern(), dataType);
            Set<OutputPattern.SourceKind> kinds = pickSourceKinds(namingInfo);
            if (kinds.contains(OutputPattern.SourceKind.ENVIRONMENT)) {
                assert kinds.contains(OutputPattern.SourceKind.PROPERTY) == false;
                assert kinds.contains(OutputPattern.SourceKind.RANDOM) == false;
                assert desc.getOrder().isEmpty();
                String outputName = output.getDescription().getName();
                Slot slot = new Slot(
                        outputName,
                        output.getSources(),
                        Models.toName(f, desc.getModelType().getName()),
                        desc.getBasePath(),
                        desc.getResourcePattern(),
                        Models.toName(f, desc.getFormat().getName()),
                        null,
                        null,
                        desc.getDeletePatterns());
                slots.add(slot);
            } else {
                List<CompiledOrder> orderingInfo = OutputPattern.compileOrder(desc.getOrder(), dataType);
                String outputName = output.getDescription().getName();
                Name naming = namingEmitter.emit(outputName, slots.size() + 1, dataType, namingInfo);
                Name ordering = orderingEmitter.emit(outputName, slots.size() + 1, dataType, orderingInfo);
                Slot slot = new Slot(
                        outputName,
                        output.getSources(),
                        Models.toName(f, desc.getModelType().getName()),
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.directio.emitter.NamingClassEmitter$Engine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.