readthresholdeventsource.h
来自「C++封装的视频采集代码」· C头文件 代码 · 共 50 行
H
50 行
#ifndef READTHRESHOLDEVENTSOURCE_H#define READTHRESHOLDEVENTSOURCE_H#include "ReadThresholdEventListener.h"#include "Misc/NotifierWithParameter.h"namespace oxsemi{ namespace circular_buffer { template<typename T> class ReadThresholdEventSource : public NotifierWithParameter<ReadThresholdEventListener, unsigned> { public: ReadThresholdEventSource(int maxListeners); /** * @return A T giving the current value of the read threshold for * the specified reader */ virtual T GetReadThreshold(unsigned readerNumber) const = 0; /** * @param threshold A T specifying the read fill level which when * exceeded should cause any registered listeners to be notified. * If the value given is zero, the registered listeners will be * notified on every occasion where the test against fill level * would have been made */ virtual void SetReadThreshold( unsigned readerNumber, T threshold) = 0; /** * @return A bool specifying whether the threshold is currently * exceeded */ virtual bool IsAboveReadThreshold(unsigned readerNumber) const = 0; }; template<typename T> ReadThresholdEventSource<T>::ReadThresholdEventSource(int maxListeners) : NotifierWithParameter<ReadThresholdEventListener, unsigned>(maxListeners) { } }}#endif // #if !defined(__READTHRESHOLDEVENTSOURCE_H__)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?