soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
STimerlineHandlerMgr.h
1#ifndef __STIMERLINEHANDLERMGR__H__
2#define __STIMERLINEHANDLERMGR__H__
3
4#include <interface/STimelineHandler-i.h>
5#include <souicoll.h>
6
7SNSBEGIN
8
9/**
10 * @class STimerlineHandlerMgr
11 * @brief Manages a collection of timeline handlers.
12 *
13 * This class manages multiple timeline handlers, allowing them to be registered and unregistered.
14 * It implements the ITimelineHandler interface and forwards the OnNextFrame notification to all registered handlers.
15 */
17 public:
18 /**
19 * @brief Constructor.
20 */
22
23 /**
24 * @brief Destructor.
25 */
27
28 /**
29 * @brief Registers a timeline handler.
30 * @param pHandler Pointer to the ITimelineHandler to register.
31 * @return TRUE if registration is successful, FALSE otherwise.
32 */
34
35 /**
36 * @brief Unregisters a timeline handler.
37 * @param pHandler Pointer to the ITimelineHandler to unregister.
38 * @return TRUE if unregistration is successful, FALSE otherwise.
39 */
41
42 /**
43 * @brief Checks if the manager is empty (no handlers registered).
44 * @return TRUE if no handlers are registered, FALSE otherwise.
45 */
46 bool IsEmpty() const;
47
48 public:
49 /**
50 * @brief Called when the next frame is ready.
51 * @param THIS_ Pointer to the current instance.
52 * This method forwards the OnNextFrame notification to all registered timeline handlers.
53 */
54 STDMETHOD_(void, OnNextFrame)(THIS_) OVERRIDE;
55
56 protected:
57 typedef SMap<ITimelineHandler *, bool> TLMAP; // Map type for storing timeline handlers.
58 TLMAP m_mapHandlers; // Map of registered timeline handlers.
59};
60
61SNSEND
62
63#endif // __STIMERLINEHANDLERMGR__H__
bool IsEmpty() const
Checks if the manager is empty (no handlers registered).
~STimerlineHandlerMgr(void)
Destructor.
void OnNextFrame() OVERRIDE
Called when the next frame is ready.
bool RegisterTimelineHandler(ITimelineHandler *pHandler)
Registers a timeline handler.
STimerlineHandlerMgr(void)
Constructor.
bool UnregisterTimelineHandler(ITimelineHandler *pHandler)
Unregisters a timeline handler.
时间轴处理接口