1 #ifndef SYNCHRONOUSGENERATORS_HPP
2 #define SYNCHRONOUSGENERATORS_HPP
5 #include "GraphGenerators.hpp"
9 class SHOWCASE_API SynchronousGraphGenerator :
public SynchronousGenerator<GraphGenerator>
12 virtual NodeEvent generateNextItem()
override;
15 virtual void queryNewItems(std::vector<QString> & to) = 0;
16 virtual NodeEvent createEvent(
const QString & item,
bool found =
true)
const = 0;
17 virtual NodeId createNodeId()
const = 0;
19 NodeEvent updateCache();
21 std::vector<QString> m_prevItemsFound;
22 std::vector<QString> m_itemsFound;
23 std::vector<QString> m_itemsRemoved;
28 class SHOWCASE_API SynchronousPropertyGenerator :
public SynchronousGenerator<PropertyGenerator>
31 SynchronousPropertyGenerator();
33 virtual bool init(
const GraphNode & n)
override;
34 virtual bool init(
const GraphEdge & e)
override;
36 virtual void queryProperties(PropertyMap & ) = 0;
38 EdgeId queryIdentifier()
const {
return m_queryIdentifier; }
39 bool isEdgeQuery()
const {
return m_isEdgeQuery; }
42 virtual PropertyEvent generateNextItem()
override;
46 PropertyEvent updateCache();
51 PropertyMap m_prevItems;
53 PropertyMap m_itemsFound;
54 PropertyMap m_itemsRemoved;
55 PropertyMap m_itemsChanged;
59 #endif // SYNCHRONOUSGENERATORS_HPP