idalib/typeinf.rs
1use bitflags::bitflags;
2
3use crate::ffi::typeinf::*;
4
5bitflags! {
6 /// Flags controlling how type declarations are extracted by [`IDB::format_decls_with`] and
7 /// [`IDB::format_cfunc_decls_with`].
8 ///
9 /// These correspond to the `PDF_*` constants in the IDA SDK's `typeinf.hpp`.
10 ///
11 /// [`IDB::format_decls_with`]: crate::idb::IDB::format_decls_with
12 /// [`IDB::format_cfunc_decls_with`]: crate::idb::IDB::format_cfunc_decls_with
13 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
14 pub struct FormatDeclsOptions: u32 {
15 /// Include all type dependencies.
16 const INCL_DEPS = PDF_INCL_DEPS as _;
17 /// Allow forward declarations.
18 const DEF_FWD = PDF_DEF_FWD as _;
19 /// Include base types: `__int8`, `__int16`, etc.
20 const DEF_BASE = PDF_DEF_BASE as _;
21 /// Prepend output with a descriptive comment.
22 const HEADER_CMT = PDF_HEADER_CMT as _;
23 /// Ignore types with anonymous names.
24 const NO_ANON_NAME = PDF_NO_ANON_NAME as _;
25 }
26}