HAL
graphics_factory.cpp
Go to the documentation of this file.
1 #include "gui/gui_globals.h"
3 
7 
8 namespace hal
9 {
10  namespace GraphicsFactory
11  {
13  {
14  return QStringList
15  {
16  "Standard Module"
17  };
18  }
19 
21  {
22  return QStringList
23  {
24  "Standard Gate"
25  };
26  }
27 
29  {
30  assert(m);
31 
32  switch (type)
33  {
34  case 0: return new StandardGraphicsModule(m);
35  default: assert(false); return nullptr; // UNREACHABLE
36  }
37  }
38 
40  {
41  assert(g);
42 
43  switch (type)
44  {
45  case 0: return new StandardGraphicsGate(g);
46  default: assert(false); return nullptr; // UNREACHABLE
47  }
48  }
49  }
50 }
Definition: gate.h:58
Abstract base class for gates.
Definition: graphics_gate.h:48
Abstract base class for modules.
The standard gate to visualize netlist gates.
The standard module to visualize netlist modules.
GraphicsModule * createGraphicsModule(Module *m, const int type)
QStringList graphicsModuleTypes()
GraphicsGate * createGraphicsGate(Gate *g, const int type)
QStringList graphicsGateTypes()
PinType type