All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
NetworKit::GraphEventProxy Class Reference

This class enables the observer pattern for dynamic graphs: It has the same modifiers as a Graph object. More...

#include <GraphEventProxy.h>

Public Member Functions

 GraphEventProxy ()
 GraphEventProxy (Graph &G)
void registerObserver (GraphEventHandler *observer)
node addNode ()
void removeNode (node u)
void restoreNode (node u)
void addEdge (node u, node v, edgeweight weight=defaultEdgeWeight)
void removeEdge (node u, node v)
void setWeight (node u, node v, edgeweight w)
void incrementWeight (node u, node v, edgeweight delta)
void timeStep ()

Public Attributes


Protected Attributes

std::vector< GraphEventHandler * > observers

Detailed Description

This class enables the observer pattern for dynamic graphs: It has the same modifiers as a Graph object.

When these modifiers are called, they are also called on the underlying graphs. Also, all registered observers (type GraphEventHandler) are notified.

Constructor & Destructor Documentation

NetworKit::GraphEventProxy::GraphEventProxy ( )
NetworKit::GraphEventProxy::GraphEventProxy ( Graph G)

Member Function Documentation

void NetworKit::GraphEventProxy::addEdge ( node  u,
node  v,
edgeweight  weight = defaultEdgeWeight 
node NetworKit::GraphEventProxy::addNode ( )
void NetworKit::GraphEventProxy::incrementWeight ( node  u,
node  v,
edgeweight  delta 
void NetworKit::GraphEventProxy::registerObserver ( GraphEventHandler observer)
void NetworKit::GraphEventProxy::removeEdge ( node  u,
node  v 
void NetworKit::GraphEventProxy::removeNode ( node  u)
void NetworKit::GraphEventProxy::restoreNode ( node  u)
void NetworKit::GraphEventProxy::setWeight ( node  u,
node  v,
edgeweight  w 
void NetworKit::GraphEventProxy::timeStep ( )

Member Data Documentation

Graph* NetworKit::GraphEventProxy::G
std::vector<GraphEventHandler*> NetworKit::GraphEventProxy::observers

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