BinaryNinja::TypeBuilder Class Reference

Public Member Functions

 TypeBuilder ()
 
 TypeBuilder (BNTypeBuilder *type)
 
 TypeBuilder (const TypeBuilder &type)
 
 TypeBuilder (TypeBuilder &&type)
 
 TypeBuilder (Type *type)
 
TypeBuilderoperator= (const TypeBuilder &type)
 
TypeBuilderoperator= (TypeBuilder &&type)
 
TypeBuilderoperator= (Type *type)
 
Ref< TypeFinalize ()
 
BNTypeClass GetClass () const
 
uint64_t GetWidth () const
 
size_t GetAlignment () const
 
QualifiedName GetTypeName () const
 
Confidence< bool > IsSigned () const
 
Confidence< bool > IsConst () const
 
Confidence< bool > IsVolatile () const
 
bool IsSystemCall () const
 
void SetIntegerTypeDisplayType (BNIntegerDisplayType displayType)
 
Confidence< Ref< Type > > GetChildType () const
 
Confidence< Ref< CallingConvention > > GetCallingConvention () const
 
std::vector< FunctionParameterGetParameters () const
 
Confidence< bool > HasVariableArguments () const
 
Confidence< bool > CanReturn () const
 
Ref< StructureGetStructure () const
 
Ref< EnumerationGetEnumeration () const
 
Ref< NamedTypeReferenceGetNamedTypeReference () const
 
Confidence< BNMemberScopeGetScope () const
 
TypeBuilderSetScope (const Confidence< BNMemberScope > &scope)
 
TypeBuilderSetConst (const Confidence< bool > &cnst)
 
TypeBuilderSetVolatile (const Confidence< bool > &vltl)
 
TypeBuilderSetChildType (const Confidence< Ref< Type > > &child)
 
TypeBuilderSetSigned (const Confidence< bool > &vltl)
 
TypeBuilderSetTypeName (const QualifiedName &name)
 
TypeBuilderSetAlternateName (const std::string &name)
 
TypeBuilderSetSystemCall (bool sc, uint32_t n=0)
 
Confidence< int64_t > GetStackAdjustment () const
 
QualifiedName GetStructureName () const
 
uint64_t GetElementCount () const
 
uint64_t GetOffset () const
 
uint32_t GetSystemCallNumber () const
 
TypeBuilderSetFunctionCanReturn (const Confidence< bool > &canReturn)
 
TypeBuilderSetParameters (const std::vector< FunctionParameter > &params)
 
std::string GetString (Platform *platform=nullptr) const
 
std::string GetTypeAndName (const QualifiedName &name) const
 
std::string GetStringBeforeName (Platform *platform=nullptr) const
 
std::string GetStringAfterName (Platform *platform=nullptr) const
 
std::vector< InstructionTextTokenGetTokens (Platform *platform=nullptr, uint8_t baseConfidence=255) const
 
std::vector< InstructionTextTokenGetTokensBeforeName (Platform *platform=nullptr, uint8_t baseConfidence=255) const
 
std::vector< InstructionTextTokenGetTokensAfterName (Platform *platform=nullptr, uint8_t baseConfidence=255) const
 
bool IsReferenceOfType (BNNamedTypeReferenceClass refType)
 
bool IsStructReference ()
 
bool IsEnumReference ()
 
bool IsUnionReference ()
 
bool IsClassReference ()
 
bool IsTypedefReference ()
 
bool IsStructOrClassReference ()
 
bool IsVoid () const
 
bool IsBool () const
 
bool IsInteger () const
 
bool IsFloat () const
 
bool IsStructure () const
 
bool IsEnumeration () const
 
bool IsPointer () const
 
bool IsArray () const
 
bool IsFunction () const
 
bool IsVarArgs () const
 
bool IsValue () const
 
bool IsNamedTypeRefer () const
 
bool IsWideChar () const
 

Static Public Member Functions

static TypeBuilder VoidType ()
 
static TypeBuilder BoolType ()
 
static TypeBuilder IntegerType (size_t width, const Confidence< bool > &sign, const std::string &altName="")
 
static TypeBuilder FloatType (size_t width, const std::string &typeName="")
 
static TypeBuilder WideCharType (size_t width, const std::string &typeName="")
 
static TypeBuilder StructureType (Structure *strct)
 
static TypeBuilder StructureType (StructureBuilder *strct)
 
static TypeBuilder NamedType (NamedTypeReference *ref, size_t width=0, size_t align=1, const Confidence< bool > &cnst=Confidence< bool >(false, 0), const Confidence< bool > &vltl=Confidence< bool >(false, 0))
 
static TypeBuilder NamedType (NamedTypeReferenceBuilder *ref, size_t width=0, size_t align=1, const Confidence< bool > &cnst=Confidence< bool >(false, 0), const Confidence< bool > &vltl=Confidence< bool >(false, 0))
 
static TypeBuilder NamedType (const QualifiedName &name, Type *type)
 
static TypeBuilder NamedType (const std::string &id, const QualifiedName &name, Type *type)
 
static TypeBuilder NamedType (BinaryView *view, const QualifiedName &name)
 
static TypeBuilder EnumerationType (Architecture *arch, Enumeration *enm, size_t width=0, const Confidence< bool > &issigned=Confidence< bool >(false, 0))
 
static TypeBuilder EnumerationType (Architecture *arch, EnumerationBuilder *enm, size_t width=0, const Confidence< bool > &issigned=Confidence< bool >(false, 0))
 
static TypeBuilder PointerType (Architecture *arch, const Confidence< Ref< Type > > &type, const Confidence< bool > &cnst=Confidence< bool >(false, 0), const Confidence< bool > &vltl=Confidence< bool >(false, 0), BNReferenceType refType=PointerReferenceType)
 
static TypeBuilder PointerType (size_t width, const Confidence< Ref< Type > > &type, const Confidence< bool > &cnst=Confidence< bool >(false, 0), const Confidence< bool > &vltl=Confidence< bool >(false, 0), BNReferenceType refType=PointerReferenceType)
 
static TypeBuilder ArrayType (const Confidence< Ref< Type > > &type, uint64_t elem)
 
static TypeBuilder FunctionType (const Confidence< Ref< Type > > &returnValue, const Confidence< Ref< CallingConvention > > &callingConvention, const std::vector< FunctionParameter > &params, const Confidence< bool > &varArg=Confidence< bool >(false, 0), const Confidence< int64_t > &stackAdjust=Confidence< int64_t >(0, 0))
 
static TypeBuilder FunctionType (const Confidence< Ref< Type > > &returnValue, const Confidence< Ref< CallingConvention > > &callingConvention, const std::vector< FunctionParameter > &params, const Confidence< bool > &hasVariableArguments, const Confidence< bool > &canReturn, const Confidence< int64_t > &stackAdjust, const std::map< uint32_t, Confidence< int32_t > > &regStackAdjust=std::map< uint32_t, Confidence< int32_t > >(), const Confidence< std::vector< uint32_t > > &returnRegs=Confidence< std::vector< uint32_t > >(std::vector< uint32_t >(), 0), BNNameType ft=NoNameType)
 

Constructor & Destructor Documentation

◆ TypeBuilder() [1/5]

TypeBuilder::TypeBuilder ( )

◆ TypeBuilder() [2/5]

TypeBuilder::TypeBuilder ( BNTypeBuilder *  type)

◆ TypeBuilder() [3/5]

TypeBuilder::TypeBuilder ( const TypeBuilder type)

◆ TypeBuilder() [4/5]

TypeBuilder::TypeBuilder ( TypeBuilder &&  type)

◆ TypeBuilder() [5/5]

TypeBuilder::TypeBuilder ( Type type)

Member Function Documentation

◆ ArrayType()

TypeBuilder TypeBuilder::ArrayType ( const Confidence< Ref< Type > > &  type,
uint64_t  elem 
)
static

◆ BoolType()

TypeBuilder TypeBuilder::BoolType ( )
static

◆ CanReturn()

Confidence< bool > TypeBuilder::CanReturn ( ) const

◆ EnumerationType() [1/2]

TypeBuilder TypeBuilder::EnumerationType ( Architecture arch,
Enumeration enm,
size_t  width = 0,
const Confidence< bool > &  issigned = Confidence<bool>(false, 0) 
)
static

◆ EnumerationType() [2/2]

TypeBuilder TypeBuilder::EnumerationType ( Architecture arch,
EnumerationBuilder enm,
size_t  width = 0,
const Confidence< bool > &  issigned = Confidence<bool>(false, 0) 
)
static

◆ Finalize()

Ref< Type > TypeBuilder::Finalize ( )

◆ FloatType()

TypeBuilder TypeBuilder::FloatType ( size_t  width,
const std::string &  typeName = "" 
)
static

◆ FunctionType() [1/2]

TypeBuilder TypeBuilder::FunctionType ( const Confidence< Ref< Type > > &  returnValue,
const Confidence< Ref< CallingConvention > > &  callingConvention,
const std::vector< FunctionParameter > &  params,
const Confidence< bool > &  hasVariableArguments,
const Confidence< bool > &  canReturn,
const Confidence< int64_t > &  stackAdjust,
const std::map< uint32_t, Confidence< int32_t > > &  regStackAdjust = std::map<uint32_t, Confidence<int32_t>>(),
const Confidence< std::vector< uint32_t > > &  returnRegs = Confidence<std::vector<uint32_t>>(std::vector<uint32_t>(), 0),
BNNameType  ft = NoNameType 
)
static

◆ FunctionType() [2/2]

TypeBuilder TypeBuilder::FunctionType ( const Confidence< Ref< Type > > &  returnValue,
const Confidence< Ref< CallingConvention > > &  callingConvention,
const std::vector< FunctionParameter > &  params,
const Confidence< bool > &  varArg = Confidence<bool>(false, 0),
const Confidence< int64_t > &  stackAdjust = Confidence<int64_t>(0, 0) 
)
static

◆ GetAlignment()

size_t TypeBuilder::GetAlignment ( ) const

◆ GetCallingConvention()

Confidence< Ref< CallingConvention > > TypeBuilder::GetCallingConvention ( ) const

◆ GetChildType()

Confidence< Ref< Type > > TypeBuilder::GetChildType ( ) const

◆ GetClass()

BNTypeClass TypeBuilder::GetClass ( ) const

◆ GetElementCount()

uint64_t TypeBuilder::GetElementCount ( ) const

◆ GetEnumeration()

Ref< Enumeration > TypeBuilder::GetEnumeration ( ) const

◆ GetNamedTypeReference()

Ref< NamedTypeReference > TypeBuilder::GetNamedTypeReference ( ) const

◆ GetOffset()

uint64_t TypeBuilder::GetOffset ( ) const

◆ GetParameters()

vector< FunctionParameter > TypeBuilder::GetParameters ( ) const

◆ GetScope()

Confidence< BNMemberScope > BinaryNinja::TypeBuilder::GetScope ( ) const

◆ GetStackAdjustment()

Confidence< int64_t > TypeBuilder::GetStackAdjustment ( ) const

◆ GetString()

string TypeBuilder::GetString ( Platform platform = nullptr) const

◆ GetStringAfterName()

string TypeBuilder::GetStringAfterName ( Platform platform = nullptr) const

◆ GetStringBeforeName()

string TypeBuilder::GetStringBeforeName ( Platform platform = nullptr) const

◆ GetStructure()

Ref< Structure > TypeBuilder::GetStructure ( ) const

◆ GetStructureName()

QualifiedName TypeBuilder::GetStructureName ( ) const

◆ GetSystemCallNumber()

uint32_t TypeBuilder::GetSystemCallNumber ( ) const

◆ GetTokens()

vector< InstructionTextToken > TypeBuilder::GetTokens ( Platform platform = nullptr,
uint8_t  baseConfidence = 255 
) const

◆ GetTokensAfterName()

vector< InstructionTextToken > TypeBuilder::GetTokensAfterName ( Platform platform = nullptr,
uint8_t  baseConfidence = 255 
) const

◆ GetTokensBeforeName()

vector< InstructionTextToken > TypeBuilder::GetTokensBeforeName ( Platform platform = nullptr,
uint8_t  baseConfidence = 255 
) const

◆ GetTypeAndName()

string TypeBuilder::GetTypeAndName ( const QualifiedName name) const

◆ GetTypeName()

QualifiedName TypeBuilder::GetTypeName ( ) const

◆ GetWidth()

uint64_t TypeBuilder::GetWidth ( ) const

◆ HasVariableArguments()

Confidence< bool > TypeBuilder::HasVariableArguments ( ) const

◆ IntegerType()

TypeBuilder TypeBuilder::IntegerType ( size_t  width,
const Confidence< bool > &  sign,
const std::string &  altName = "" 
)
static

◆ IsArray()

bool BinaryNinja::TypeBuilder::IsArray ( ) const
inline

◆ IsBool()

bool BinaryNinja::TypeBuilder::IsBool ( ) const
inline

◆ IsClassReference()

bool BinaryNinja::TypeBuilder::IsClassReference ( )
inline

◆ IsConst()

Confidence< bool > TypeBuilder::IsConst ( ) const

◆ IsEnumeration()

bool BinaryNinja::TypeBuilder::IsEnumeration ( ) const
inline

◆ IsEnumReference()

bool BinaryNinja::TypeBuilder::IsEnumReference ( )
inline

◆ IsFloat()

bool BinaryNinja::TypeBuilder::IsFloat ( ) const
inline

◆ IsFunction()

bool BinaryNinja::TypeBuilder::IsFunction ( ) const
inline

◆ IsInteger()

bool BinaryNinja::TypeBuilder::IsInteger ( ) const
inline

◆ IsNamedTypeRefer()

bool BinaryNinja::TypeBuilder::IsNamedTypeRefer ( ) const
inline

◆ IsPointer()

bool BinaryNinja::TypeBuilder::IsPointer ( ) const
inline

◆ IsReferenceOfType()

bool BinaryNinja::TypeBuilder::IsReferenceOfType ( BNNamedTypeReferenceClass  refType)

◆ IsSigned()

Confidence< bool > TypeBuilder::IsSigned ( ) const

◆ IsStructOrClassReference()

bool BinaryNinja::TypeBuilder::IsStructOrClassReference ( )
inline

◆ IsStructReference()

bool BinaryNinja::TypeBuilder::IsStructReference ( )
inline

◆ IsStructure()

bool BinaryNinja::TypeBuilder::IsStructure ( ) const
inline

◆ IsSystemCall()

bool TypeBuilder::IsSystemCall ( ) const

◆ IsTypedefReference()

bool BinaryNinja::TypeBuilder::IsTypedefReference ( )
inline

◆ IsUnionReference()

bool BinaryNinja::TypeBuilder::IsUnionReference ( )
inline

◆ IsValue()

bool BinaryNinja::TypeBuilder::IsValue ( ) const
inline

◆ IsVarArgs()

bool BinaryNinja::TypeBuilder::IsVarArgs ( ) const
inline

◆ IsVoid()

bool BinaryNinja::TypeBuilder::IsVoid ( ) const
inline

◆ IsVolatile()

Confidence< bool > BinaryNinja::TypeBuilder::IsVolatile ( ) const

◆ IsWideChar()

bool BinaryNinja::TypeBuilder::IsWideChar ( ) const
inline

◆ NamedType() [1/5]

TypeBuilder TypeBuilder::NamedType ( BinaryView view,
const QualifiedName name 
)
static

◆ NamedType() [2/5]

TypeBuilder TypeBuilder::NamedType ( const QualifiedName name,
Type type 
)
static

◆ NamedType() [3/5]

static TypeBuilder BinaryNinja::TypeBuilder::NamedType ( const std::string &  id,
const QualifiedName name,
Type type 
)
static

◆ NamedType() [4/5]

TypeBuilder TypeBuilder::NamedType ( NamedTypeReference ref,
size_t  width = 0,
size_t  align = 1,
const Confidence< bool > &  cnst = Confidence<bool>(false, 0),
const Confidence< bool > &  vltl = Confidence<bool>(false, 0) 
)
static

◆ NamedType() [5/5]

TypeBuilder TypeBuilder::NamedType ( NamedTypeReferenceBuilder ref,
size_t  width = 0,
size_t  align = 1,
const Confidence< bool > &  cnst = Confidence<bool>(false, 0),
const Confidence< bool > &  vltl = Confidence<bool>(false, 0) 
)
static

◆ operator=() [1/3]

TypeBuilder & TypeBuilder::operator= ( const TypeBuilder type)

◆ operator=() [2/3]

TypeBuilder & TypeBuilder::operator= ( Type type)

◆ operator=() [3/3]

TypeBuilder & TypeBuilder::operator= ( TypeBuilder &&  type)

◆ PointerType() [1/2]

TypeBuilder TypeBuilder::PointerType ( Architecture arch,
const Confidence< Ref< Type > > &  type,
const Confidence< bool > &  cnst = Confidence<bool>(false, 0),
const Confidence< bool > &  vltl = Confidence<bool>(false, 0),
BNReferenceType  refType = PointerReferenceType 
)
static

◆ PointerType() [2/2]

TypeBuilder TypeBuilder::PointerType ( size_t  width,
const Confidence< Ref< Type > > &  type,
const Confidence< bool > &  cnst = Confidence<bool>(false, 0),
const Confidence< bool > &  vltl = Confidence<bool>(false, 0),
BNReferenceType  refType = PointerReferenceType 
)
static

◆ SetAlternateName()

TypeBuilder & TypeBuilder::SetAlternateName ( const std::string &  name)

◆ SetChildType()

TypeBuilder & TypeBuilder::SetChildType ( const Confidence< Ref< Type > > &  child)

◆ SetConst()

TypeBuilder & TypeBuilder::SetConst ( const Confidence< bool > &  cnst)

◆ SetFunctionCanReturn()

TypeBuilder & TypeBuilder::SetFunctionCanReturn ( const Confidence< bool > &  canReturn)

◆ SetIntegerTypeDisplayType()

void TypeBuilder::SetIntegerTypeDisplayType ( BNIntegerDisplayType  displayType)

◆ SetParameters()

TypeBuilder & TypeBuilder::SetParameters ( const std::vector< FunctionParameter > &  params)

◆ SetScope()

TypeBuilder & BinaryNinja::TypeBuilder::SetScope ( const Confidence< BNMemberScope > &  scope)

◆ SetSigned()

TypeBuilder & TypeBuilder::SetSigned ( const Confidence< bool > &  vltl)

◆ SetSystemCall()

TypeBuilder & TypeBuilder::SetSystemCall ( bool  sc,
uint32_t  n = 0 
)

◆ SetTypeName()

TypeBuilder & TypeBuilder::SetTypeName ( const QualifiedName name)

◆ SetVolatile()

TypeBuilder & TypeBuilder::SetVolatile ( const Confidence< bool > &  vltl)

◆ StructureType() [1/2]

TypeBuilder TypeBuilder::StructureType ( Structure strct)
static

◆ StructureType() [2/2]

TypeBuilder TypeBuilder::StructureType ( StructureBuilder strct)
static

◆ VoidType()

TypeBuilder TypeBuilder::VoidType ( )
static

◆ WideCharType()

TypeBuilder TypeBuilder::WideCharType ( size_t  width,
const std::string &  typeName = "" 
)
static

The documentation for this class was generated from the following files: