HAL  v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
gui_extension_python_base.cpp
Go to the documentation of this file.
4 #include <iostream>
5 
6 namespace hal {
7 
8  GuiExtensionPythonBase::GuiExtensionPythonBase(const std::string& tag, const std::string &lab)
9  : m_tagname(tag), m_label(lab)
10  {
11  std::cerr << "GuiExtensionPythonBase::GuiExtensionPythonBase <" << tag << "> <" << lab << ">" << std::endl;
12  }
13 
15  {
16  std::cerr << "GuiExtensionPythonBase::~GuiExtensionPythonBase <" << m_tagname << "> <" << m_label << ">" << std::endl;
17  }
18 
19  void GuiExtensionPythonBase::add_main_menu(const std::vector<PluginParameter> &params)
20  {
22  {
24  }
25  }
26 
27  void GuiExtensionPythonBase::add_module_context(const std::string tagname, const std::string label)
28  {
30  {
32  }
33  }
34 
35  void GuiExtensionPythonBase::add_gate_context(const std::string tagname, const std::string label)
36  {
38  {
40  }
41  }
42 
43  void GuiExtensionPythonBase::add_net_context(const std::string tagname, const std::string label)
44  {
46  {
48  }
49  }
50 
51 
52  void GuiExtensionPythonBase::set_selection(const std::vector<u32>& mods, const std::vector<u32>& gats, const std::vector<u32>& nets)
53  {
54  m_mods_selected = mods;
55  m_gats_selected = gats;
56  m_nets_selected = nets;
57  }
58 
60  {
61  return m_mods_selected;
62  }
63 
65  {
66  return m_gats_selected;
67  }
68 
70  {
71  return m_nets_selected;
72  }
73 
74  void GuiExtensionPythonBase::set_function_call(const std::string& fc)
75  {
76  m_function_call = fc;
77  }
78 
80  {
81  return m_function_call;
82  }
83 
84  std::vector<PluginParameter> GuiExtensionPythonBase::get_parameter() const
85  {
87  {
89  }
90  return std::vector<PluginParameter>();
91  }
92 
94  {
95  m_tagname.clear();
96  m_label.clear();
97 
98  m_mods_selected.clear();
99  m_gats_selected.clear();
100  m_nets_selected.clear();
101 
102  m_function_call.clear();
103 
105  {
107  }
108  }
109 }
void add_net_context(GuiExtensionPythonBase *plug, const std::string tagname, const std::string label)
void add_gate_context(GuiExtensionPythonBase *plug, const std::string tagname, const std::string label)
std::vector< PluginParameter > get_parameter() const override
static GuiExtensionContext * sInstance
void add_module_context(GuiExtensionPythonBase *plug, const std::string tagname, const std::string label)
void add_main_menu(GuiExtensionPythonBase *plug, const std::vector< PluginParameter > &params)
virtual void set_function_call(const std::string &fc)
std::vector< PluginParameter > get_parameter() const
virtual void add_main_menu(const std::vector< PluginParameter > &params)
GuiExtensionPythonBase(const std::string &tag, const std::string &lab)
std::vector< u32 > get_selected_modules() const
virtual void add_gate_context(const std::string tagname, const std::string label)
std::vector< u32 > get_selected_gates() const
virtual void add_module_context(const std::string tagname, const std::string label)
std::vector< u32 > get_selected_nets() const
virtual void add_net_context(const std::string tagname, const std::string label)
virtual void set_selection(const std::vector< u32 > &mods, const std::vector< u32 > &gats, const std::vector< u32 > &nets)
Definition: defines.h:45