SConscript (11996:b71e950a8bd0) SConscript (11997:1f7df6984b6f)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

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

605########################################################################
606#
607# Create all of the SimObject param headers and enum headers
608#
609
610def createSimObjectParamStruct(target, source, env):
611 assert len(target) == 1 and len(source) == 1
612
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

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

605########################################################################
606#
607# Create all of the SimObject param headers and enum headers
608#
609
610def createSimObjectParamStruct(target, source, env):
611 assert len(target) == 1 and len(source) == 1
612
613 name = str(source[0].get_contents())
613 name = source[0].get_text_contents()
614 obj = sim_objects[name]
615
616 code = code_formatter()
617 obj.cxx_param_decl(code)
618 code.write(target[0].abspath)
619
620def createSimObjectCxxConfig(is_header):
621 def body(target, source, env):

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

627 code = code_formatter()
628 obj.cxx_config_param_file(code, is_header)
629 code.write(target[0].abspath)
630 return body
631
632def createEnumStrings(target, source, env):
633 assert len(target) == 1 and len(source) == 2
634
614 obj = sim_objects[name]
615
616 code = code_formatter()
617 obj.cxx_param_decl(code)
618 code.write(target[0].abspath)
619
620def createSimObjectCxxConfig(is_header):
621 def body(target, source, env):

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

627 code = code_formatter()
628 obj.cxx_config_param_file(code, is_header)
629 code.write(target[0].abspath)
630 return body
631
632def createEnumStrings(target, source, env):
633 assert len(target) == 1 and len(source) == 2
634
635 name = str(source[0].get_contents())
635 name = source[0].get_text_contents()
636 use_python = source[1].read()
637 obj = all_enums[name]
638
639 code = code_formatter()
640 obj.cxx_def(code)
641 if use_python:
642 obj.pybind_def(code)
643 code.write(target[0].abspath)
644
645def createEnumDecls(target, source, env):
646 assert len(target) == 1 and len(source) == 1
647
636 use_python = source[1].read()
637 obj = all_enums[name]
638
639 code = code_formatter()
640 obj.cxx_def(code)
641 if use_python:
642 obj.pybind_def(code)
643 code.write(target[0].abspath)
644
645def createEnumDecls(target, source, env):
646 assert len(target) == 1 and len(source) == 1
647
648 name = str(source[0].get_contents())
648 name = source[0].get_text_contents()
649 obj = all_enums[name]
650
651 code = code_formatter()
652 obj.cxx_decl(code)
653 code.write(target[0].abspath)
654
655def createSimObjectPyBindWrapper(target, source, env):
649 obj = all_enums[name]
650
651 code = code_formatter()
652 obj.cxx_decl(code)
653 code.write(target[0].abspath)
654
655def createSimObjectPyBindWrapper(target, source, env):
656 name = source[0].get_contents()
656 name = source[0].get_text_contents()
657 obj = sim_objects[name]
658
659 code = code_formatter()
660 obj.pybind_decl(code)
661 code.write(target[0].abspath)
662
663# Generate all of the SimObject param C++ struct header files
664params_hh_files = []

--- 582 unchanged lines hidden ---
657 obj = sim_objects[name]
658
659 code = code_formatter()
660 obj.pybind_decl(code)
661 code.write(target[0].abspath)
662
663# Generate all of the SimObject param C++ struct header files
664params_hh_files = []

--- 582 unchanged lines hidden ---