diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplateFactory.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplateFactory.java new file mode 100644 index 000000000..934d0ebfd --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplateFactory.java @@ -0,0 +1,26 @@ +package dk.camelot64.kickc.fragment; + +import dk.camelot64.kickc.fragment.signature.AsmFragmentSignature; +import dk.camelot64.kickc.model.TargetCpu; + +/** + * Abstract factory for creating ASM fragment templates from signatures. + */ +public interface AsmFragmentTemplateFactory { + + /** + * Get the CPU that the factory produces templates for + * + * @return The target CPU + */ + TargetCpu getCpu(); + + /** + * Get an ASM template from a signature. + * + * @param signature The signature describing the ASM fragment + * @return The ASM fragment template that can be used for generating ASM + */ + AsmFragmentTemplate getTemplate(AsmFragmentSignature signature); + +}