#ifndef COROUTINES_INCLUDE_CORO_INTERNAL_COTEST_CRF_SYNCH_H_ #define COROUTINES_INCLUDE_CORO_INTERNAL_COTEST_CRF_SYNCH_H_ #include #include #include "cotest-crf-core.h" #include "cotest-crf-payloads.h" #include "cotest-util-types.h" namespace testing { namespace crf { // ------------------ Classes ------------------ class MockRoutingSession; class InteriorEventSession; template class InteriorSignatureMockCS; class InteriorLaunchSessionBase; template class InteriorLaunchSession; class TestCoroutine; class PreMockSynchroniser : public virtual MessageNode { public: ReplyPair ReceiveMessage(std::unique_ptr &&to_node) override; std::string DebugString() const override; static PreMockSynchroniser *GetInstance(); private: enum class State { Idle, PassToMain, Start, Working, Complete, WaitingForAck }; State state = State::Idle; std::unique_ptr current_pre_mock; std::queue> send_pm_to; static PreMockSynchroniser instance; }; } // namespace crf } // namespace testing #endif