MT Showcase SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Showcase::GraphGenerator Class Referenceabstract

Component interface for graph generators. More...

#include <GraphGenerators.hpp>

Inheritance diagram for Showcase::GraphGenerator:
Showcase::Generator< NodeEvent > Showcase::CachingGenerator< GraphGenerator > Showcase::SynchronousGenerator< GraphGenerator > Showcase::CachingGraphGenerator

Public Member Functions

virtual QString protocol () const =0
 This will return protocol name for the generator. More...
 
virtual bool init (const GraphNode &n)
 This will initialize the generator. More...
 
- Public Member Functions inherited from Showcase::Generator< NodeEvent >
virtual folly::Future< NodeEventnext (folly::Executor *executor=nullptr)=0
 Initiate generation of the next value. More...
 

Detailed Description

Component interface for graph generators.

Instance of graph generator is created when querying children of the node

Member Function Documentation

bool Showcase::GraphGenerator::init ( const GraphNode n)
virtual

This will initialize the generator.

No time consuming tasks should be done in init. The default implementation checks that the protocol-part in node id matches to the protocol of this generator.

Returns
Can this generator generate any events for the given node
virtual QString Showcase::GraphGenerator::protocol ( ) const
pure virtual

This will return protocol name for the generator.

Protocol name is assumed to be Prefix of the node id. For example the id for some node from file system would be file://path/to/node and its protocol would be 'file'.