7 py::class_<DataContainer, RawPtrWrapper<DataContainer>> py_data_container(m,
"DataContainer", R
"(
8 Container to hold data that is associated with an entity.
11 py_data_container.def(py::init<>(), R"(
12 Construct a new data container.
15 py_data_container.def("set_data", &
DataContainer::set_data, py::arg(
"category"), py::arg(
"key"), py::arg(
"data_type"), py::arg(
"value"), py::arg(
"log_with_info_level") =
false, R
"(
17 May overwrite an existing entry.
19 :param str category: The data key category.
20 :param str key: The data key.
21 :param str data_type: The data type.
22 :param str value: The data value.
23 :param bool log_with_info_level: Force explicit logging channel 'netlist' with log level 'info' to trace GUI events.
24 :returns: True on success, false otherwise.
29 Determine whether an entry of given category and key exists.
31 :param str category: The data key category.
32 :param str key: The data key.
33 :returns: True if the entry exists, False otherwise.
38 Get the data entry specified by the given category and key.
40 :param str category: The data key category.
41 :param str key: The data key.
42 :returns: The tuple ((1) type, (2) value).
43 :rtype: tuple(str,str)
46 py_data_container.def("delete_data", &
DataContainer::delete_data, py::arg(
"category"), py::arg(
"key"), py::arg(
"log_with_info_level") =
false, R
"(
49 :param str category: The data key category.
50 :param str key: The data key.
51 :param bool log_with_info_level: Force explicit logging channel 'netlist' with log level 'info' to trace GUI events.
52 :returns: True on success, false otherwise.
57 A dict from ((1) category, (2) key) to ((1) type, (2) value) containing all stored data entries.
59 :type: dict[tuple(str,str),tuple(str,str)]
63 Get a dict from ((1) category, (2) key) to ((1) type, (2) value) containing all stored data entries.
65 :returns: The stored data as a dict.
66 :rtype: dict[tuple(str,str),tuple(str,str)]
const std::map< std::tuple< std::string, std::string >, std::tuple< std::string, std::string > > & get_data_map() const
std::tuple< std::string, std::string > get_data(const std::string &category, const std::string &key) const
bool set_data(const std::string &category, const std::string &key, const std::string &data_type, const std::string &value, const bool log_with_info_level=false)
bool has_data(const std::string &category, const std::string &key) const
bool delete_data(const std::string &category, const std::string &key, const bool log_with_info_level=false)
void data_container_init(py::module &m)
const Module * module(const Gate *g, const NodeBoxes &boxes)