MT Showcase SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Showcase::CachedGraph Class Reference

Cached graph reads, monitors and caches connected graph starting from the given root node. More...

#include <CachedGraph.hpp>

Inherits enable_shared_from_this< CachedGraph >.

Public Member Functions

CachedNodePtr getNode (const NodeId &id) const
 This can return nullptr even if the requested node would be part of the graph (reachable from the root node). More...
 
void startCaching ()
 

Detailed Description

Cached graph reads, monitors and caches connected graph starting from the given root node.

Only nodes that are reachable from the root node can ever be accessed.

This is built on top of cached nodes which on the other hand is built on top of node events. The cached graph has following features/limitations:

  • Single node can be child to multiple nodes
  • Root can only be removed if there is a cycle and then the node, that is parent for the root is removed

Member Function Documentation

CachedNodePtr Showcase::CachedGraph::getNode ( const NodeId id) const

This can return nullptr even if the requested node would be part of the graph (reachable from the root node).

This happens if the caching process hasn't yet reached the requested node.

This gives errors, find out why?

void Showcase::CachedGraph::startCaching ( )

Basically exists because shared_from_this can't be called on ctor