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

Component interface for property generators. More...

#include <GraphGenerators.hpp>

Inheritance diagram for Showcase::PropertyGenerator:
Showcase::Generator< PropertyEvent > Showcase::CachingGenerator< PropertyGenerator > Showcase::SynchronousGenerator< PropertyGenerator > Showcase::CachingPropertyGenerator

Public Member Functions

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

Detailed Description

Component interface for property generators.

Member Function Documentation

bool Showcase::PropertyGenerator::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 generater.

Returns
Can this generator generate any events for the given node
bool Showcase::PropertyGenerator::init ( const GraphEdge &  e)
virtual

This will initialize the generator.

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

Returns
Can this generator generate any events for the given edge
virtual bool Showcase::PropertyGenerator::init ( const PropertyEvent )
inlinevirtual

This will initialize the generator.

No time consuming tasks should be done in init. The default implementation returns false. For example property 'imdb-id = 1234', could launch generator that fetches data from imdb.

Returns
Can this generator generate any events based on the given property