You.i Engine
YiTimelineGroup.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_TIMELINE_GROUP_H_
3 #define _YI_TIMELINE_GROUP_H_
4 
6 
7 class CYITimelineGroupPriv;
8 
26 {
27 public:
28  virtual ~CYITimelineGroup();
29 
34  void AddTimeline(CYIAbstractTimeline *pTimeline);
39  void AddTimelineWithOffset(CYIAbstractTimeline *pTimeline, uint64_t millis);
40 
44  size_t GetTimelineCount() const;
45 
49  std::vector<CYIAbstractTimeline *> GetTimelines() const;
50 
56  std::vector<std::pair<CYIAbstractTimeline *, uint64_t>> GetTimelinesWithOffsets(CYIAbstractTimeline::Direction direction = CYIAbstractTimeline::Direction::Forward) const;
57 
66 
70  void RemoveTimeline(CYIAbstractTimeline *pTimeline);
71  void RemoveAllTimelines();
72 
76  void RemoveTimelinesIf(const std::function<bool(CYIAbstractTimeline *)> &predicate);
77 
82  void UpdateOffsetOfTimeline(const CYIAbstractTimeline *pTimeline, uint64_t millis);
83 
85 
86 protected:
87  CYITimelineGroup(std::unique_ptr<CYITimelineGroupPriv> pPriv);
88 
89 private:
91  CYITimelineGroup &operator=(const CYITimelineGroup &);
92 
93  const CYITimelineGroupPriv *GetPriv() const;
94  CYITimelineGroupPriv *GetPriv();
95 
97 };
98 
103 #endif /*_YI_TIMELINE_GROUP_H_*/
The base class for the timeline framework.
Definition: YiAbstractTimeline.h:29
void RemoveTimeline(CYIAbstractTimeline *pTimeline)
virtual ~CYITimelineGroup()
void RemoveAllTimelines()
size_t GetTimelineCount() const
The base class for types of timeline groups.
Definition: YiTimelineGroup.h:25
uint64_t GetTimelineOffset(CYIAbstractTimeline *pTimeline, CYIAbstractTimeline::Direction direction=CYIAbstractTimeline::Direction::Forward) const
void AddTimelineWithOffset(CYIAbstractTimeline *pTimeline, uint64_t millis)
Direction
Definition: YiAbstractTimeline.h:64
CYISignal< CYIAbstractTimeline * > ChildTimelineCompleted
called whenever execution of one of the contained timelines completes normally
Definition: YiTimelineGroup.h:84
CYITimelineGroup(std::unique_ptr< CYITimelineGroupPriv > pPriv)
void UpdateOffsetOfTimeline(const CYIAbstractTimeline *pTimeline, uint64_t millis)
void RemoveTimelinesIf(const std::function< bool(CYIAbstractTimeline *)> &predicate)
std::vector< std::pair< CYIAbstractTimeline *, uint64_t > > GetTimelinesWithOffsets(CYIAbstractTimeline::Direction direction=CYIAbstractTimeline::Direction::Forward) const
#define YI_TYPE_BASES(CLASS, BASES...)
Definition: YiRtti.h:257
void AddTimeline(CYIAbstractTimeline *pTimeline)
Signals and slots are a thread-safe and flexible communication framework that will allow various obje...
Definition: YiSignal.h:168
std::vector< CYIAbstractTimeline * > GetTimelines() const