From 4108964609171327618627477163339656037111 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Mon, 20 Feb 2023 21:58:55 -0500 Subject: Type Containers --- python/typelibrary.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'python/typelibrary.py') diff --git a/python/typelibrary.py b/python/typelibrary.py index 53f3e8ef..364a458d 100644 --- a/python/typelibrary.py +++ b/python/typelibrary.py @@ -28,6 +28,7 @@ from . import types from . import metadata from . import platform from . import architecture +from . import typecontainer class TypeLibrary: @@ -227,7 +228,7 @@ class TypeLibrary: """ return core.BNFinalizeTypeLibrary(self.handle) - def query_metadata(self, key: str) -> Optional[metadata.Metadata]: + def query_metadata(self, key: str) -> Optional['metadata.MetadataValueType']: """ `query_metadata` retrieves a metadata associated with the given key stored in the type library @@ -281,6 +282,15 @@ class TypeLibrary: """ core.BNTypeLibraryRemoveMetadata(self.handle, key) + @property + def type_container(self) -> 'typecontainer.TypeContainer': + """ + `type_container` returns a TypeContainer interface for interacting with the type library. + + :return: TypeContainer interface + """ + return typecontainer.TypeContainer(core.BNGetTypeLibraryTypeContainer(self.handle)) + def add_named_object(self, name: 'types.QualifiedName', type: 'types.Type') -> None: """ `add_named_object` directly inserts a named object into the type library's object store. -- cgit v1.3.1