Deleted Added
sdiff udiff text old ( 12035:7b8e1b36875d ) new ( 12036:634fbd07bc88 )
full compact
1# Copyright (c) 2017 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 687 unchanged lines hidden (view full) ---

696
697static void
698module_init(py::module &m_internal)
699{
700 py::module m = m_internal.def_submodule("param_${cls}");
701''')
702 code.indent()
703 if cls._base:
704 code('py::class_<${cls}Params, ${{cls._base.type}}Params>(m, ' \
705 '"${cls}Params")')
706 else:
707 code('py::class_<${cls}Params>(m, "${cls}Params")')
708
709 code.indent()
710 if not hasattr(cls, 'abstract') or not cls.abstract:
711 code('.def(py::init<>())')
712 code('.def("create", &${cls}Params::create)')
713
714 param_exports = cls.cxx_param_exports + [
715 PyBindProperty(k)

--- 8 unchanged lines hidden (view full) ---

724 code(';')
725 code()
726 code.dedent()
727
728 bases = [ cls._base.cxx_class ] + cls.cxx_bases if cls._base else \
729 cls.cxx_bases
730 if bases:
731 base_str = ", ".join(bases)
732 code('py::class_<${{cls.cxx_class}}, ${base_str}>(m, ' \
733 '"${py_class_name}")')
734 else:
735 code('py::class_<${{cls.cxx_class}}>(m, "${py_class_name}")')
736 code.indent()
737 for exp in cls.cxx_exports:
738 exp.export(code, cls.cxx_class)
739 code(';')
740 code.dedent()
741 code()
742 code.dedent()
743 code('}')

--- 812 unchanged lines hidden ---