mFrame
載入中...
搜尋中...
無符合項目
Iterable.h
1
7#ifndef MFRAME_11DE2BBA_4823_4E3F_884E_9A333C00AD9F
8#define MFRAME_11DE2BBA_4823_4E3F_884E_9A333C00AD9F
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15
16//----------------------------------------------------------------------------------------
17#include "./../func/Consumer.h"
18#include "./../lang/Interface.h"
19
20/* ***************************************************************************************
21 * Namespace
22 */
23namespace mframe::lang {
24 template <typename E>
25 struct Iterable;
26} // namespace mframe::lang
27
28/* ***************************************************************************************
29 * Class/Interface/Struct/Enum
30 */
31template <typename E = void*>
32struct mframe::lang::Iterable : public virtual Interface {
33 /* *************************************************************************************
34 * Method
35 */
36
47 virtual void forEach(mframe::func::Consumer<E&>& action) abstract;
48};
49
50/* ***************************************************************************************
51 * End of file
52 */
53
54#endif /* MFRAME_11DE2BBA_4823_4E3F_884E_9A333C00AD9F */
Definition Appendable.h:23
Definition Consumer.h:31
Definition Interface.h:134
Definition Iterable.h:32
virtual void forEach(mframe::func::Consumer< E & > &action) override
對Iterable的每個元素執行給定的操作,直到處理完所有元素或該操作引發異常。 如果指定了迭代順序,則操作會按迭代順序執行。