The main unit of similarity processing. More...
The main unit of similarity processing.
Public Member Functions | |
| SimilaritySessionNode (BNSimilaritySessionNode *node) | |
| SimilaritySessionNode (Ref< BinaryView > view) | |
| Creates a node for a non-null active view, keeps the view alive, and schedules its analyzed functions. | |
| SimilaritySessionNode (Ref< FileMetadata > file) | |
| Creates a node whose view will be loaded from `file` when the session runs. | |
| Ref< BinaryView > | GetView () const |
| Returns the active view, or `nullptr` if the node is not loaded. | |
| void | SetView (Ref< BinaryView > view) |
| Sets the active view. | |
| Ref< FileMetadata > | GetFile () const |
| Returns the file used by the node. | |
| Ref< Settings > | GetLoadOptions () const |
| Returns mutable settings used when the session loads this node's view. | |
| SimilaritySessionNodeId | GetId () const |
| SimilarityEntityId | CreateEntity (const SimilarityEntityInfo &info) |
| Adds an entity without scheduling it. | |
| bool | RemoveEntity (SimilarityEntityId id) |
| Removes an entity, its schedule, its provider results, and its selected result. | |
| std::optional< SimilarityEntityInfo > | GetEntity (SimilarityEntityId id) |
| Returns information about an entity, or no value if `id` is not found. | |
| std::vector< SimilarityEntityId > | GetEntities () |
| Returns every entity in the node, including entities used only as match targets. | |
| bool | AddScheduledEntity (SimilarityEntityId id) |
| Schedules an entity for the next provider round. | |
| bool | RemoveScheduledEntity (SimilarityEntityId id) |
| Unschedules an entity without removing it from the node. | |
| std::vector< SimilarityEntityId > | GetScheduledEntities () |
| Returns the entities waiting for provider processing. | |
| Ref< Function > | GetEntityFunction (SimilarityEntityId id) |
| Resolves a function entity against the active view, or returns `nullptr`. | |
| std::vector< SimilarityResultId > | GetResults (SimilarityEntityId entity) |
| Returns the result IDs for an entity. | |
| std::optional< SimilarityResult > | GetResult (SimilarityResultId result) |
| Returns a stored result by its ID, which is unique within the node. | |
| bool | SetResolvedResult (SimilarityEntityId entity, SimilarityResultId result) |
| Selects one of the entity's results. | |
| std::optional< SimilarityResultId > | GetResolvedResult (SimilarityEntityId entity) |
| bool | ClearResolvedResult (SimilarityEntityId entity) |
| std::vector< SimilaritySessionNodeId > | GetIncomingEdges () |
| Returns incoming node IDs in ascending order. | |
| std::vector< SimilaritySessionNodeId > | GetOutgoingEdges () |
| Returns outgoing node IDs in ascending order. | |
| std::vector< Ref< SimilaritySessionNode > > | GetIncomingNodes () |
| Returns incoming nodes ordered by ID. | |
| std::vector< Ref< SimilaritySessionNode > > | GetOutgoingNodes () |
| Returns outgoing nodes ordered by ID. | |
| Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNSimilaritySessionNode, BNNewSimilaritySessionNodeReference, BNFreeSimilaritySessionNode > | |
| CoreRefCountObject () | |
| virtual | ~CoreRefCountObject () |
| BNSimilaritySessionNode * | GetObject () const |
| void | AddRef () |
| void | Release () |
| void | AddRefForRegistration () |
| void | ReleaseForRegistration () |
| void | AddRefForCallback () |
| void | ReleaseForCallback () |
Additional Inherited Members | |
| Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNSimilaritySessionNode, BNNewSimilaritySessionNodeReference, BNFreeSimilaritySessionNode > | |
| std::atomic< int > | m_refs |
| bool | m_registeredRef |
| BNSimilaritySessionNode * | m_object |
| SimilaritySessionNode::SimilaritySessionNode | ( | BNSimilaritySessionNode * | node | ) |
| SimilaritySessionNode::SimilaritySessionNode | ( | Ref< BinaryView > | view | ) |
Creates a node for a non-null active view, keeps the view alive, and schedules its analyzed functions.
| SimilaritySessionNode::SimilaritySessionNode | ( | Ref< FileMetadata > | file | ) |
Creates a node whose view will be loaded from `file` when the session runs.
`file` must be non-null. The session closes the view when the run no longer needs it, so the view may be unavailable at other times.
| Ref< BinaryView > SimilaritySessionNode::GetView | ( | ) | const |
Returns the active view, or `nullptr` if the node is not loaded.
A file-backed node may be unavailable outside a session run.
| void SimilaritySessionNode::SetView | ( | Ref< BinaryView > | view | ) |
| Ref< FileMetadata > SimilaritySessionNode::GetFile | ( | ) | const |
Returns the file used by the node.
This is always valid.
Returns mutable settings used when the session loads this node's view.
Modify them before running the session.
| SimilaritySessionNodeId SimilaritySessionNode::GetId | ( | ) | const |
| SimilarityEntityId SimilaritySessionNode::CreateEntity | ( | const SimilarityEntityInfo & | info | ) |
Adds an entity without scheduling it.
Existing entities are reused, and a non-empty name refreshes their display name.
| bool SimilaritySessionNode::RemoveEntity | ( | SimilarityEntityId | id | ) |
Removes an entity, its schedule, its provider results, and its selected result.
To only unschedule it, call RemoveScheduledEntity.
| std::optional< SimilarityEntityInfo > SimilaritySessionNode::GetEntity | ( | SimilarityEntityId | id | ) |
Returns information about an entity, or no value if `id` is not found.
| std::vector< SimilarityEntityId > SimilaritySessionNode::GetEntities | ( | ) |
Returns every entity in the node, including entities used only as match targets.
| bool SimilaritySessionNode::AddScheduledEntity | ( | SimilarityEntityId | id | ) |
Schedules an entity for the next provider round.
Nodes initially schedule all available entities. The session consumes each scheduled batch after providers visit it. During a run, only the resolver currently processing this node may request another round. Schedule entities from other contexts between runs.
| bool SimilaritySessionNode::RemoveScheduledEntity | ( | SimilarityEntityId | id | ) |
Unschedules an entity without removing it from the node.
To remove it, call RemoveEntity.
| std::vector< SimilarityEntityId > SimilaritySessionNode::GetScheduledEntities | ( | ) |
Returns the entities waiting for provider processing.
| Ref< Function > SimilaritySessionNode::GetEntityFunction | ( | SimilarityEntityId | id | ) |
Resolves a function entity against the active view, or returns `nullptr`.
| std::vector< SimilarityResultId > SimilaritySessionNode::GetResults | ( | SimilarityEntityId | entity | ) |
Returns the result IDs for an entity.
| std::optional< SimilarityResult > SimilaritySessionNode::GetResult | ( | SimilarityResultId | result | ) |
Returns a stored result by its ID, which is unique within the node.
| bool SimilaritySessionNode::SetResolvedResult | ( | SimilarityEntityId | entity, |
| SimilarityResultId | result ) |
Selects one of the entity's results.
| std::optional< SimilarityResultId > SimilaritySessionNode::GetResolvedResult | ( | SimilarityEntityId | entity | ) |
| bool SimilaritySessionNode::ClearResolvedResult | ( | SimilarityEntityId | entity | ) |
| std::vector< SimilaritySessionNodeId > SimilaritySessionNode::GetIncomingEdges | ( | ) |
Returns incoming node IDs in ascending order.
| std::vector< SimilaritySessionNodeId > SimilaritySessionNode::GetOutgoingEdges | ( | ) |
Returns outgoing node IDs in ascending order.
| std::vector< Ref< SimilaritySessionNode > > SimilaritySessionNode::GetIncomingNodes | ( | ) |
Returns incoming nodes ordered by ID.
| std::vector< Ref< SimilaritySessionNode > > SimilaritySessionNode::GetOutgoingNodes | ( | ) |
Returns outgoing nodes ordered by ID.