'''
Created on 2016-04-29

Copyright (c) 2016 Bradford Dillman

@author: bdillman

xform which generates code from models and templates.
'''

import logging

from fashion import templates

logging.debug("fashion_gen loaded")

def outputKinds():
    '''Outputs generated by this xform'''
    return [ ]

def police(fashion_gen):
    '''Validate models before xform.'''
    pass

def xform(fashion_gen):
    '''Perform source generation from template.'''
    logging.debug("fashion_gen xform running")
    for f in fashion_gen:
        m = f.loadFile()
        templates.generateFile(**m)
