You.i Engine
YiTimelineBackingStore.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_TIMELINE_BACKING_STORE_H_
3 #define _YI_TIMELINE_BACKING_STORE_H_
4 
7 
8 class CYISceneNode;
9 class CYITimeline;
10 class CYITimelineBackingStorePriv;
11 
30 class CYITimelineBackingStore : public std::enable_shared_from_this<CYITimelineBackingStore>
31 {
33 
34 public:
36  virtual ~CYITimelineBackingStore();
37 
41  void ReserveTracks(size_t tracksCount);
42 
49  CYITimelineTrack *AddTrack(uint32_t trackID, CYITimelineTrack::AttributeType attribute, const CYIString &targetName);
50 
54  void ReserveMarkers(size_t markersCount);
55 
61  void AddMarker(CYIString name, uint32_t startTime, uint32_t duration, std::vector<CYITimelineTrack::TrackIdentifier> tracksSelection, std::map<CYIString, CYIString> markerProperties);
62 
68  void AddMarker(CYIMarkerData::ID markerID, uint32_t startTime, uint32_t duration, std::vector<CYITimelineTrack::TrackIdentifier> tracksSelection, std::map<CYIString, CYIString> markerProperties);
69 
76  std::unique_ptr<CYITimeline> CreateTimeline(CYISceneNode *pRootNode = nullptr);
77 
85  std::unique_ptr<CYITimeline> CreateTimeline(CYIStringView markerName, CYISceneNode *pRootNode = nullptr);
86 
94  std::unique_ptr<CYITimeline> CreateTimeline(CYIMarkerData::ID markerID, CYISceneNode *pRootNode = nullptr);
95 
103  std::unique_ptr<CYITimeline> CreateTimelineFromMarkerIndex(size_t markerIndex, CYISceneNode *pRootNode = nullptr);
104 
113  std::unique_ptr<CYITimeline> CreateTimeline(uint32_t startTime, uint32_t duration, CYISceneNode *pRootNode = nullptr);
114 
120  void Finalize();
121 
125  virtual uint32_t GetTotalTime() const;
126 
131  const CYITimelineTrack *GetTrack(size_t trackID) const;
132 
138 
142  size_t GetTrackCount() const;
143 
147  size_t GetMarkerCount() const;
148 
155  const CYIMarkerData *GetMarkerData(CYIStringView markerName) const;
156 
161  const CYIString &GetMarkerNameFromMarkerIndex(size_t markerIndex) const;
162 
166  size_t GetApproximateSize() const;
167 
168 private:
170  const CYITimelineBackingStore &operator=(const CYITimelineBackingStore &);
171  std::unique_ptr<CYITimelineBackingStorePriv> m_pPriv;
172 };
173 
176 #endif /* _YI_TIMELINE_BACKING_STORE_H_ */
size_t GetApproximateSize() const
A class containing timeline marker and track data required to create a CYITimeline.
Definition: YiTimelineBackingStore.h:30
A timeline which sources its data from a backing store.
Definition: YiTimeline.h:53
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:36
AttributeType
Definition: YiTimelineTrack.h:31
ID
Definition: YiMarkerData.h:35
void AddMarker(CYIString name, uint32_t startTime, uint32_t duration, std::vector< CYITimelineTrack::TrackIdentifier > tracksSelection, std::map< CYIString, CYIString > markerProperties)
A representation of a single track of a CYITimeline.
Definition: YiTimelineTrack.h:25
CYITimelineTrack * AddTrack(uint32_t trackID, CYITimelineTrack::AttributeType attribute, const CYIString &targetName)
std::unique_ptr< CYITimeline > CreateTimeline(CYISceneNode *pRootNode=nullptr)
A scene node is the base type for all nodes which are used by the scene manager; it is an integral pa...
Definition: YiSceneNode.h:99
void ReserveMarkers(size_t markersCount)
const CYIString & GetMarkerNameFromMarkerIndex(size_t markerIndex) const
const CYIMarkerData * GetMarkerData(CYIStringView markerName) const
virtual ~CYITimelineBackingStore()
size_t GetTrackCount() const
size_t GetMarkerCount() const
friend class CYITimelineBackingStorePriv
Definition: YiTimelineBackingStore.h:32
std::unique_ptr< CYITimeline > CreateTimelineFromMarkerIndex(size_t markerIndex, CYISceneNode *pRootNode=nullptr)
void ReserveTracks(size_t tracksCount)
Contains information on an exported marker from After Effects.
Definition: YiMarkerData.h:32
const CYITimelineTrack * GetTrack(size_t trackID) const
virtual uint32_t GetTotalTime() const
A lightweight wrapper around a sequence of Unicode characters.
Definition: YiStringView.h:57