python.hh revision 13323
110447Snilay@cs.wisc.edu/*
210447Snilay@cs.wisc.edu * Copyright 2018 Google, Inc.
310447Snilay@cs.wisc.edu *
410447Snilay@cs.wisc.edu * Redistribution and use in source and binary forms, with or without
510447Snilay@cs.wisc.edu * modification, are permitted provided that the following conditions are
610447Snilay@cs.wisc.edu * met: redistributions of source code must retain the above copyright
710447Snilay@cs.wisc.edu * notice, this list of conditions and the following disclaimer;
810447Snilay@cs.wisc.edu * redistributions in binary form must reproduce the above copyright
910447Snilay@cs.wisc.edu * notice, this list of conditions and the following disclaimer in the
1010447Snilay@cs.wisc.edu * documentation and/or other materials provided with the distribution;
1110447Snilay@cs.wisc.edu * neither the name of the copyright holders nor the names of its
1210447Snilay@cs.wisc.edu * contributors may be used to endorse or promote products derived from
1310447Snilay@cs.wisc.edu * this software without specific prior written permission.
1410447Snilay@cs.wisc.edu *
1510447Snilay@cs.wisc.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1610447Snilay@cs.wisc.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1710447Snilay@cs.wisc.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1810447Snilay@cs.wisc.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1910447Snilay@cs.wisc.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2010447Snilay@cs.wisc.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2110447Snilay@cs.wisc.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2210447Snilay@cs.wisc.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2310447Snilay@cs.wisc.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2410447Snilay@cs.wisc.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2510447Snilay@cs.wisc.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2610447Snilay@cs.wisc.edu *
2710447Snilay@cs.wisc.edu * Authors: Gabe Black
2810447Snilay@cs.wisc.edu */
2910447Snilay@cs.wisc.edu
3010447Snilay@cs.wisc.edu#ifndef __SYSTEMC_CORE_PYTHON_HH__
3110447Snilay@cs.wisc.edu#define __SYSTEMC_CORE_PYTHON_HH__
3210447Snilay@cs.wisc.edu
3310447Snilay@cs.wisc.edu#include "python/pybind11/pybind.hh"
3410447Snilay@cs.wisc.edu
3510447Snilay@cs.wisc.edunamespace sc_gem5
3610447Snilay@cs.wisc.edu{
3710447Snilay@cs.wisc.edu
3810447Snilay@cs.wisc.edustruct PythonReadyFunc
3910447Snilay@cs.wisc.edu{
4010447Snilay@cs.wisc.edu    PythonReadyFunc *next;
4110447Snilay@cs.wisc.edu
4210447Snilay@cs.wisc.edu    PythonReadyFunc();
4310447Snilay@cs.wisc.edu    ~PythonReadyFunc() {}
4410447Snilay@cs.wisc.edu    virtual void run() = 0;
4510447Snilay@cs.wisc.edu};
4610447Snilay@cs.wisc.edu
4710447Snilay@cs.wisc.edustruct PythonInitFunc
4810447Snilay@cs.wisc.edu{
4910447Snilay@cs.wisc.edu    PythonInitFunc *next;
5010447Snilay@cs.wisc.edu
5110447Snilay@cs.wisc.edu    PythonInitFunc();
5210447Snilay@cs.wisc.edu    ~PythonInitFunc() {}
5310447Snilay@cs.wisc.edu    virtual void run(pybind11::module &systemc) = 0;
5410447Snilay@cs.wisc.edu};
5510447Snilay@cs.wisc.edu
5610447Snilay@cs.wisc.edu} // namespace sc_gem5
5710447Snilay@cs.wisc.edu
58#endif  //__SYSTEMC_CORE_PYTHON_HH__
59