HAL
v4.5.0-124-g47ab54673
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
graphics_factory.cpp
Go to the documentation of this file.
1
#include "
gui/gui_globals.h
"
2
#include "
gui/graph_widget/graphics_factory.h
"
3
4
#include "
gui/graph_widget/items/nodes/gates/standard_graphics_gate.h
"
5
#include "
gui/graph_widget/items/nodes/modules/standard_graphics_module.h
"
6
#include "
hal_core/netlist/netlist.h
"
7
8
namespace
hal
9
{
10
namespace
GraphicsFactory
11
{
12
QStringList
graphicsModuleTypes
()
13
{
14
return
QStringList
15
{
16
"Standard Module"
17
};
18
}
19
20
QStringList
graphicsGateTypes
()
21
{
22
return
QStringList
23
{
24
"Standard Gate"
25
};
26
}
27
28
GraphicsModule
*
createGraphicsModule
(
Module
* m,
const
int
type
)
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
39
GraphicsGate
*
createGraphicsGate
(
Gate
* g,
const
int
type
)
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
}
hal::Gate
Definition:
gate.h:58
hal::GraphicsGate
Abstract base class for gates.
Definition:
graphics_gate.h:48
hal::GraphicsModule
Abstract base class for modules.
Definition:
graphics_module.h:45
hal::Module
Definition:
module.h:66
hal::StandardGraphicsGate
The standard gate to visualize netlist gates.
Definition:
standard_graphics_gate.h:39
hal::StandardGraphicsModule
The standard module to visualize netlist modules.
Definition:
standard_graphics_module.h:40
graphics_factory.h
gui_globals.h
netlist.h
hal::GraphicsFactory::createGraphicsModule
GraphicsModule * createGraphicsModule(Module *m, const int type)
Definition:
graphics_factory.cpp:28
hal::GraphicsFactory::graphicsModuleTypes
QStringList graphicsModuleTypes()
Definition:
graphics_factory.cpp:12
hal::GraphicsFactory::createGraphicsGate
GraphicsGate * createGraphicsGate(Gate *g, const int type)
Definition:
graphics_factory.cpp:39
hal::GraphicsFactory::graphicsGateTypes
QStringList graphicsGateTypes()
Definition:
graphics_factory.cpp:20
hal
Definition:
defines.h:45
type
PinType type
Definition:
netlist_serializer.cpp:59
QStringList
standard_graphics_gate.h
standard_graphics_module.h
plugins
gui
src
graph_widget
graphics_factory.cpp
Generated by
1.9.1