ArmNN
 20.02
TimelineDecoder.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 #include <vector>
9 
10 namespace armnn
11 {
12 namespace timelinedecoder
13 {
15 {
16 
17 public:
18 
19  struct Model
20  {
21  std::vector<Entity> m_Entities;
22  std::vector<EventClass> m_EventClasses;
23  std::vector<Event> m_Events;
24  std::vector<Label> m_Labels;
25  std::vector<Relationship> m_Relationships;
26  };
27 
28  using OnNewEntityCallback = void (*)(Model &, const Entity);
29  using OnNewEventClassCallback = void (*)(Model &, const EventClass);
30  using OnNewEventCallback = void (*)(Model &, const Event);
31  using OnNewLabelCallback = void (*)(Model &, const Label);
32  using OnNewRelationshipCallback = void (*)(Model &, const Relationship);
33 
34  virtual TimelineStatus CreateEntity(const Entity &) override;
35  virtual TimelineStatus CreateEventClass(const EventClass &) override;
36  virtual TimelineStatus CreateEvent(const Event &) override;
37  virtual TimelineStatus CreateLabel(const Label &) override;
38  virtual TimelineStatus CreateRelationship(const Relationship &) override;
39 
40  const Model& GetModel();
41 
42 
48 
49  void print();
50 
51 private:
52  Model m_Model;
53 
54  OnNewEntityCallback m_OnNewEntityCallback;
55  OnNewEventClassCallback m_OnNewEventClassCallback;
56  OnNewEventCallback m_OnNewEventCallback;
57  OnNewLabelCallback m_OnNewLabelCallback;
58  OnNewRelationshipCallback m_OnNewRelationshipCallback;
59 
60  void printLabels();
61  void printEntities();
62  void printEventClasses();
63  void printRelationships();
64  void printEvents();
65 };
66 
67 }
68 }
TimelineStatus SetRelationshipCallback(const OnNewRelationshipCallback)
virtual TimelineStatus CreateEvent(const Event &) override
void(*)(Model &, const Relationship) OnNewRelationshipCallback
Copyright (c) 2020 ARM Limited.
virtual TimelineStatus CreateEntity(const Entity &) override
void(*)(Model &, const Event) OnNewEventCallback
virtual TimelineStatus CreateLabel(const Label &) override
TimelineStatus SetEventClassCallback(const OnNewEventClassCallback)
void(*)(Model &, const Entity) OnNewEntityCallback
virtual TimelineStatus CreateRelationship(const Relationship &) override
void(*)(Model &, const EventClass) OnNewEventClassCallback
virtual TimelineStatus CreateEventClass(const EventClass &) override
void(*)(Model &, const Label) OnNewLabelCallback
TimelineStatus SetLabelCallback(const OnNewLabelCallback)
TimelineStatus SetEntityCallback(const OnNewEntityCallback)
TimelineStatus SetEventCallback(const OnNewEventCallback)