#ifndef WORK_LIST_H_INCLUDED #define WORK_LIST_H_INCLUDED #include #include class UpdateCommand; class WorkList { public: std::vector> m_workList; unsigned m_workListIndex{0}; WorkList() = default; template void push_back(T&& arg) { m_workList.push_back(std::forward(arg)); } bool empty() const { return m_workList.empty(); } // move constructor: pass in classes derived from UpdateCommand // template //typename = typename std::enable_if::type, // UpdateCommand>::value>::type> // WorkList(Ts&&... args) // : m_workList(std::forward(args...)) // , m_workListIndex(0) { //} unsigned nextExecIndex() const; bool nextExec() const; bool exec(bool last=false); }; #endif // WORK_LIST_H_INCLUDED