#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
import os
from az_code_gen.base import *
from AzReflectionCpp import format_cpp_annotations

class AZEBusInline_Driver(TemplateDriver):

    def apply_transformations(self, json_object):
        format_cpp_annotations(json_object)

    def render_templates(self, input_file, **template_kwargs):
        input_file_name, input_file_ext = os.path.splitext(input_file)
        self.render_template_to_file(
            "AzEBusInline.tpl", template_kwargs, '{}.generated.inline'.format(input_file_name))


# Factory function - called from launcher
def create_drivers(env):
    return [AZEBusInline_Driver(env)]

[(18, 'AzReflectionCpp.format_cpp_annotations', 'format_cpp_annotations', False, 'from AzReflectionCpp import format_cpp_annotations\n'), (21, 'os.path.splitext', 'os.path.splitext', False, 'import os\n')]