Classes | |
class | BinaryNinja::TypePrinter |
class | BinaryNinja::CoreTypePrinter |
class BinaryNinja::TypePrinter |
Public Member Functions | |
virtual std::vector< InstructionTextToken > | GetTypeTokens (Ref< Type > type, Ref< Platform > platform, const QualifiedName &name, uint8_t baseConfidence=255, BNTokenEscapingType escaping=NoTokenEscapingType) |
Generate a single-line text representation of a type. | |
virtual std::vector< InstructionTextToken > | GetTypeTokensBeforeName (Ref< Type > type, Ref< Platform > platform, uint8_t baseConfidence=255, Ref< Type > parentType=nullptr, BNTokenEscapingType escaping=NoTokenEscapingType)=0 |
In a single-line text representation of a type, generate the tokens that should be printed before the type's name. | |
virtual std::vector< InstructionTextToken > | GetTypeTokensAfterName (Ref< Type > type, Ref< Platform > platform, uint8_t baseConfidence=255, Ref< Type > parentType=nullptr, BNTokenEscapingType escaping=NoTokenEscapingType)=0 |
In a single-line text representation of a type, generate the tokens that should be printed after the type's name. | |
virtual std::string | GetTypeString (Ref< Type > type, Ref< Platform > platform, const QualifiedName &name, BNTokenEscapingType escaping=NoTokenEscapingType) |
Generate a single-line text representation of a type. | |
virtual std::string | GetTypeStringBeforeName (Ref< Type > type, Ref< Platform > platform, BNTokenEscapingType escaping=NoTokenEscapingType) |
In a single-line text representation of a type, generate the string that should be printed before the type's name. | |
virtual std::string | GetTypeStringAfterName (Ref< Type > type, Ref< Platform > platform, BNTokenEscapingType escaping=NoTokenEscapingType) |
In a single-line text representation of a type, generate the string that should be printed after the type's name. | |
virtual std::vector< TypeDefinitionLine > | GetTypeLines (Ref< Type > type, const TypeContainer &types, const QualifiedName &name, int paddingCols=64, bool collapsed=false, BNTokenEscapingType escaping=NoTokenEscapingType)=0 |
Generate a multi-line representation of a type. | |
virtual std::string | PrintAllTypes (const std::vector< std::pair< QualifiedName, Ref< Type > > > &types, Ref< BinaryView > data, int paddingCols=64, BNTokenEscapingType escaping=NoTokenEscapingType) |
Print all types to a single big string, including headers, sections, etc. | |
std::string | DefaultPrintAllTypes (const std::vector< std::pair< QualifiedName, Ref< Type > > > &types, Ref< BinaryView > data, int paddingCols=64, BNTokenEscapingType escaping=NoTokenEscapingType) |
Default implementation of PrintAllTypes Print all types to a single big string, including headers, sections, etc. | |
Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNTypePrinter > | |
StaticCoreRefCountObject () | |
virtual | ~StaticCoreRefCountObject () |
BNTypePrinter * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Static Public Member Functions | |
static void | Register (TypePrinter *printer) |
static std::vector< Ref< TypePrinter > > | GetList () |
static Ref< TypePrinter > | GetByName (const std::string &name) |
static Ref< TypePrinter > | GetDefault () |
Static Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNTypePrinter > | |
static BNTypePrinter * | GetObject (StaticCoreRefCountObject *obj) |
Protected Member Functions | |
TypePrinter (const std::string &name) | |
TypePrinter (BNTypePrinter *printer) | |
Static Protected Member Functions | |
static bool | GetTypeTokensCallback (void *ctxt, BNType *type, BNPlatform *platform, BNQualifiedName *name, uint8_t baseConfidence, BNTokenEscapingType escaping, BNInstructionTextToken **result, size_t *resultCount) |
static bool | GetTypeTokensBeforeNameCallback (void *ctxt, BNType *type, BNPlatform *platform, uint8_t baseConfidence, BNType *parentType, BNTokenEscapingType escaping, BNInstructionTextToken **result, size_t *resultCount) |
static bool | GetTypeTokensAfterNameCallback (void *ctxt, BNType *type, BNPlatform *platform, uint8_t baseConfidence, BNType *parentType, BNTokenEscapingType escaping, BNInstructionTextToken **result, size_t *resultCount) |
static bool | GetTypeStringCallback (void *ctxt, BNType *type, BNPlatform *platform, BNQualifiedName *name, BNTokenEscapingType escaping, char **result) |
static bool | GetTypeStringBeforeNameCallback (void *ctxt, BNType *type, BNPlatform *platform, BNTokenEscapingType escaping, char **result) |
static bool | GetTypeStringAfterNameCallback (void *ctxt, BNType *type, BNPlatform *platform, BNTokenEscapingType escaping, char **result) |
static bool | GetTypeLinesCallback (void *ctxt, BNType *type, BNTypeContainer *types, BNQualifiedName *name, int paddingCols, bool collapsed, BNTokenEscapingType escaping, BNTypeDefinitionLine **result, size_t *resultCount) |
static bool | PrintAllTypesCallback (void *ctxt, BNQualifiedName *names, BNType **types, size_t typeCount, BNBinaryView *data, int paddingCols, BNTokenEscapingType escaping, char **result) |
static void | FreeTokensCallback (void *ctxt, BNInstructionTextToken *tokens, size_t count) |
static void | FreeStringCallback (void *ctxt, char *string) |
static void | FreeLinesCallback (void *ctxt, BNTypeDefinitionLine *lines, size_t count) |
Additional Inherited Members | |
Public Attributes inherited from BinaryNinja::StaticCoreRefCountObject< BNTypePrinter > | |
std::atomic< int > | m_refs |
BNTypePrinter * | m_object |
|
explicitprotected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
static |
|
static |
|
static |
|
static |
|
virtual |
Generate a single-line text representation of a type.
type | Type to print |
platform | Platform responsible for this type |
name | Name of the type |
baseConfidence | Confidence to use for tokens created for this type |
escaping | Style of escaping literals which may not be parsable |
Reimplemented in BinaryNinja::CoreTypePrinter.
|
pure virtual |
In a single-line text representation of a type, generate the tokens that should be printed before the type's name.
type | Type to print |
platform | Platform responsible for this type |
baseConfidence | Confidence to use for tokens created for this type |
parentType | Type of the parent of this type, or nullptr |
escaping | Style of escaping literals which may not be parsable |
Implemented in BinaryNinja::CoreTypePrinter.
|
pure virtual |
In a single-line text representation of a type, generate the tokens that should be printed after the type's name.
type | Type to print |
platform | Platform responsible for this type |
baseConfidence | Confidence to use for tokens created for this type |
parentType | Type of the parent of this type, or nullptr |
escaping | Style of escaping literals which may not be parsable |
Implemented in BinaryNinja::CoreTypePrinter.
|
virtual |
Generate a single-line text representation of a type.
type | Type to print |
platform | Platform responsible for this type |
name | Name of the type |
escaping | Style of escaping literals which may not be parsable |
Reimplemented in BinaryNinja::CoreTypePrinter.
|
virtual |
In a single-line text representation of a type, generate the string that should be printed before the type's name.
type | Type to print |
platform | Platform responsible for this type |
escaping | Style of escaping literals which may not be parsable |
Reimplemented in BinaryNinja::CoreTypePrinter.
|
virtual |
In a single-line text representation of a type, generate the string that should be printed after the type's name.
type | Type to print |
platform | Platform responsible for this type |
escaping | Style of escaping literals which may not be parsable |
Reimplemented in BinaryNinja::CoreTypePrinter.
|
pure virtual |
Generate a multi-line representation of a type.
type | Type to print |
types | Type Container in which the type is defined |
name | Name of the type |
paddingCols | Maximum number of bytes represented by each padding line |
collapsed | Whether to collapse structure/enum blocks |
escaping | Style of escaping literals which may not be parsable |
Implemented in BinaryNinja::CoreTypePrinter.
|
virtual |
Print all types to a single big string, including headers, sections, etc.
types | All types to print |
data | Binary View in which all the types are defined |
paddingCols | Maximum number of bytes represented by each padding line |
escaping | Style of escaping literals which may not be parsable |
Reimplemented in BinaryNinja::CoreTypePrinter.
std::string TypePrinter::DefaultPrintAllTypes | ( | const std::vector< std::pair< QualifiedName, Ref< Type > > > & | types, |
Ref< BinaryView > | data, | ||
int | paddingCols = 64, | ||
BNTokenEscapingType | escaping = NoTokenEscapingType ) |
Default implementation of PrintAllTypes Print all types to a single big string, including headers, sections, etc.
types | All types to print |
data | Binary View in which all the types are defined |
paddingCols | Maximum number of bytes represented by each padding line |
escaping | Style of escaping literals which may not be parsable |
class BinaryNinja::CoreTypePrinter |
Public Member Functions | |
CoreTypePrinter (BNTypePrinter *printer) | |
virtual | ~CoreTypePrinter () |
virtual std::vector< InstructionTextToken > | GetTypeTokens (Ref< Type > type, Ref< Platform > platform, const QualifiedName &name, uint8_t baseConfidence, BNTokenEscapingType escaping) override |
Generate a single-line text representation of a type. | |
virtual std::vector< InstructionTextToken > | GetTypeTokensBeforeName (Ref< Type > type, Ref< Platform > platform, uint8_t baseConfidence, Ref< Type > parentType, BNTokenEscapingType escaping) override |
In a single-line text representation of a type, generate the tokens that should be printed before the type's name. | |
virtual std::vector< InstructionTextToken > | GetTypeTokensAfterName (Ref< Type > type, Ref< Platform > platform, uint8_t baseConfidence, Ref< Type > parentType, BNTokenEscapingType escaping) override |
In a single-line text representation of a type, generate the tokens that should be printed after the type's name. | |
virtual std::string | GetTypeString (Ref< Type > type, Ref< Platform > platform, const QualifiedName &name, BNTokenEscapingType escaping) override |
Generate a single-line text representation of a type. | |
virtual std::string | GetTypeStringBeforeName (Ref< Type > type, Ref< Platform > platform, BNTokenEscapingType escaping) override |
In a single-line text representation of a type, generate the string that should be printed before the type's name. | |
virtual std::string | GetTypeStringAfterName (Ref< Type > type, Ref< Platform > platform, BNTokenEscapingType escaping) override |
In a single-line text representation of a type, generate the string that should be printed after the type's name. | |
virtual std::vector< TypeDefinitionLine > | GetTypeLines (Ref< Type > type, const TypeContainer &types, const QualifiedName &name, int paddingCols, bool collapsed, BNTokenEscapingType escaping) override |
Generate a multi-line representation of a type. | |
virtual std::string | PrintAllTypes (const std::vector< std::pair< QualifiedName, Ref< Type > > > &types, Ref< BinaryView > data, int paddingCols, BNTokenEscapingType escaping) override |
Print all types to a single big string, including headers, sections, etc. | |
Public Member Functions inherited from BinaryNinja::TypePrinter | |
std::string | DefaultPrintAllTypes (const std::vector< std::pair< QualifiedName, Ref< Type > > > &types, Ref< BinaryView > data, int paddingCols=64, BNTokenEscapingType escaping=NoTokenEscapingType) |
Default implementation of PrintAllTypes Print all types to a single big string, including headers, sections, etc. | |
Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNTypePrinter > | |
StaticCoreRefCountObject () | |
virtual | ~StaticCoreRefCountObject () |
BNTypePrinter * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Additional Inherited Members | |
Static Public Member Functions inherited from BinaryNinja::TypePrinter | |
static void | Register (TypePrinter *printer) |
static std::vector< Ref< TypePrinter > > | GetList () |
static Ref< TypePrinter > | GetByName (const std::string &name) |
static Ref< TypePrinter > | GetDefault () |
Static Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNTypePrinter > | |
static BNTypePrinter * | GetObject (StaticCoreRefCountObject *obj) |
Public Attributes inherited from BinaryNinja::StaticCoreRefCountObject< BNTypePrinter > | |
std::atomic< int > | m_refs |
BNTypePrinter * | m_object |
Protected Member Functions inherited from BinaryNinja::TypePrinter | |
TypePrinter (const std::string &name) | |
TypePrinter (BNTypePrinter *printer) | |
Static Protected Member Functions inherited from BinaryNinja::TypePrinter | |
static bool | GetTypeTokensCallback (void *ctxt, BNType *type, BNPlatform *platform, BNQualifiedName *name, uint8_t baseConfidence, BNTokenEscapingType escaping, BNInstructionTextToken **result, size_t *resultCount) |
static bool | GetTypeTokensBeforeNameCallback (void *ctxt, BNType *type, BNPlatform *platform, uint8_t baseConfidence, BNType *parentType, BNTokenEscapingType escaping, BNInstructionTextToken **result, size_t *resultCount) |
static bool | GetTypeTokensAfterNameCallback (void *ctxt, BNType *type, BNPlatform *platform, uint8_t baseConfidence, BNType *parentType, BNTokenEscapingType escaping, BNInstructionTextToken **result, size_t *resultCount) |
static bool | GetTypeStringCallback (void *ctxt, BNType *type, BNPlatform *platform, BNQualifiedName *name, BNTokenEscapingType escaping, char **result) |
static bool | GetTypeStringBeforeNameCallback (void *ctxt, BNType *type, BNPlatform *platform, BNTokenEscapingType escaping, char **result) |
static bool | GetTypeStringAfterNameCallback (void *ctxt, BNType *type, BNPlatform *platform, BNTokenEscapingType escaping, char **result) |
static bool | GetTypeLinesCallback (void *ctxt, BNType *type, BNTypeContainer *types, BNQualifiedName *name, int paddingCols, bool collapsed, BNTokenEscapingType escaping, BNTypeDefinitionLine **result, size_t *resultCount) |
static bool | PrintAllTypesCallback (void *ctxt, BNQualifiedName *names, BNType **types, size_t typeCount, BNBinaryView *data, int paddingCols, BNTokenEscapingType escaping, char **result) |
static void | FreeTokensCallback (void *ctxt, BNInstructionTextToken *tokens, size_t count) |
static void | FreeStringCallback (void *ctxt, char *string) |
static void | FreeLinesCallback (void *ctxt, BNTypeDefinitionLine *lines, size_t count) |
CoreTypePrinter::CoreTypePrinter | ( | BNTypePrinter * | printer | ) |
|
inlinevirtual |
|
overridevirtual |
Generate a single-line text representation of a type.
type | Type to print |
platform | Platform responsible for this type |
name | Name of the type |
baseConfidence | Confidence to use for tokens created for this type |
escaping | Style of escaping literals which may not be parsable |
Reimplemented from BinaryNinja::TypePrinter.
|
overridevirtual |
In a single-line text representation of a type, generate the tokens that should be printed before the type's name.
type | Type to print |
platform | Platform responsible for this type |
baseConfidence | Confidence to use for tokens created for this type |
parentType | Type of the parent of this type, or nullptr |
escaping | Style of escaping literals which may not be parsable |
Implements BinaryNinja::TypePrinter.
|
overridevirtual |
In a single-line text representation of a type, generate the tokens that should be printed after the type's name.
type | Type to print |
platform | Platform responsible for this type |
baseConfidence | Confidence to use for tokens created for this type |
parentType | Type of the parent of this type, or nullptr |
escaping | Style of escaping literals which may not be parsable |
Implements BinaryNinja::TypePrinter.
|
overridevirtual |
Generate a single-line text representation of a type.
type | Type to print |
platform | Platform responsible for this type |
name | Name of the type |
escaping | Style of escaping literals which may not be parsable |
Reimplemented from BinaryNinja::TypePrinter.
|
overridevirtual |
In a single-line text representation of a type, generate the string that should be printed before the type's name.
type | Type to print |
platform | Platform responsible for this type |
escaping | Style of escaping literals which may not be parsable |
Reimplemented from BinaryNinja::TypePrinter.
|
overridevirtual |
In a single-line text representation of a type, generate the string that should be printed after the type's name.
type | Type to print |
platform | Platform responsible for this type |
escaping | Style of escaping literals which may not be parsable |
Reimplemented from BinaryNinja::TypePrinter.
|
overridevirtual |
Generate a multi-line representation of a type.
type | Type to print |
types | Type Container in which the type is defined |
name | Name of the type |
paddingCols | Maximum number of bytes represented by each padding line |
collapsed | Whether to collapse structure/enum blocks |
escaping | Style of escaping literals which may not be parsable |
Implements BinaryNinja::TypePrinter.
|
overridevirtual |
Print all types to a single big string, including headers, sections, etc.
types | All types to print |
data | Binary View in which all the types are defined |
paddingCols | Maximum number of bytes represented by each padding line |
escaping | Style of escaping literals which may not be parsable |
Reimplemented from BinaryNinja::TypePrinter.