fpmas 1.6
Public Types | Public Member Functions | Public Attributes | List of all members
fpmas::api::graph::SetLocalNodeEvent< T > Struct Template Reference

#include <distributed_graph.h>

Inheritance diagram for fpmas::api::graph::SetLocalNodeEvent< T >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::api::graph::SetLocalNodeEvent< T >:
Collaboration graph
[legend]

Public Types

enum  Context { BUILD_LOCAL , IMPORT_NEW_LOCAL , IMPORT_EXISTING_LOCAL , UNSPECIFIED }
 

Public Member Functions

 SetLocalNodeEvent (DistributedNode< T > *node, Context context)
 
- Public Member Functions inherited from fpmas::api::graph::NodeEvent< T >
 NodeEvent (DistributedNode< T > *node)
 

Public Attributes

Context context
 
- Public Attributes inherited from fpmas::api::graph::NodeEvent< T >
DistributedNode< T > * node
 

Detailed Description

template<typename T>
struct fpmas::api::graph::SetLocalNodeEvent< T >

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.

Member Enumeration Documentation

◆ 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.

Constructor & Destructor Documentation

◆ SetLocalNodeEvent()

template<typename T >
fpmas::api::graph::SetLocalNodeEvent< T >::SetLocalNodeEvent ( DistributedNode< T > *  node,
Context  context 
)
inline

SetLocalNodeEvent constructor.

Member Data Documentation

◆ context

template<typename T >
Context fpmas::api::graph::SetLocalNodeEvent< T >::context

Event context.


The documentation for this struct was generated from the following file: