![]() |
fpmas 1.6
|
#include <distributed_graph.h>
Public Types | |
enum | Context { BUILD_LOCAL , IMPORT_NEW_LOCAL , IMPORT_EXISTING_LOCAL , UNSPECIFIED } |
Public Member Functions | |
SetLocalNodeEvent (DistributedNode< T > *node, Context context) | |
![]() | |
NodeEvent (DistributedNode< T > *node) | |
Public Attributes | |
Context | context |
![]() | |
DistributedNode< T > * | node |
Event triggered when a node is set LOCAL within a DistributedGraph.
Such event can be handled with callbacks provided to DistributedGraph::addCallOnSetLocal().
In addition to the node instance, information about the context of the event are provided.
enum fpmas::api::graph::SetLocalNodeEvent::Context |
Specifies the cause of the set LOCAL operation.
Enumerator | |
---|---|
BUILD_LOCAL | Used when a node is set LOCAL due to a DistributedGraph::buildNode() operation. |
IMPORT_NEW_LOCAL | Used when a new LOCAL node is imported in the graph, in the context of a DistributedGraph::distribute() operation. |
IMPORT_EXISTING_LOCAL | Used when a LOCAL node is imported in the graph while the corresponding DISTANT node was already contained in the graph. In this case, the existing DISTANT node is set to LOCAL. The node pointer contained in the SetLocalNodeEvent references the existing node, after its weight and data as been updated from the imported node. |
UNSPECIFIED | Can be used when the event context is unspecified or does not falls in the other explicit contexts. Can also be useful for tests that does not depend on the context. |
|
inline |
SetLocalNodeEvent constructor.
Context fpmas::api::graph::SetLocalNodeEvent< T >::context |
Event context.