MCPcopy Create free account
hub / github.com/lief-project/LIEF / Base>

Method Base>

api/python/src/DWARF/types/pyBase.cpp:6–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4namespace LIEF::dwarf::py {
5template<>
6void create<dw::types::Base>(nb::module_& m) {
7 nb::class_<dw::types::Base, dw::Type> type(m, "Base",
8 R"doc(
9 This class wraps the ``DW_TAG_base_type`` type which can be used -- for
10 instance -- to represent integers or primitive types.
11 )doc"_doc
12 );
13
14 nb::enum_<dw::types::Base::ENCODING>(type, "ENCODING")
15 .value("NONE", dw::types::Base::ENCODING::NONE)
16 .value("SIGNED", dw::types::Base::ENCODING::SIGNED, "Mirror ``DW_ATE_signed``"_doc)
17 .value("SIGNED_CHAR", dw::types::Base::ENCODING::SIGNED_CHAR, "Mirror ``DW_ATE_signed_char``"_doc)
18 .value("UNSIGNED", dw::types::Base::ENCODING::UNSIGNED, "Mirror ``DW_ATE_unsigned``"_doc)
19 .value("UNSIGNED_CHAR", dw::types::Base::ENCODING::UNSIGNED_CHAR, "Mirror ``DW_ATE_unsigned_char``"_doc)
20 .value("FLOAT", dw::types::Base::ENCODING::FLOAT, "Mirror ``DW_ATE_float``"_doc)
21 .value("BOOLEAN", dw::types::Base::ENCODING::BOOLEAN, "Mirror ``DW_ATE_boolean``"_doc)
22 .value("ADDRESS", dw::types::Base::ENCODING::ADDRESS, "Mirror ``DW_ATE_address``"_doc)
23 ;
24
25 type
26 .def_prop_ro("encoding", &dw::types::Base::encoding,
27 R"doc(
28 Describe how the base type is encoded and should be interpreted.
29 )doc"_doc
30 )
31 ;
32}
33
34}

Callers

nothing calls this directly

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected