123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #ifndef __ASIO2_IO_CONTEXT_COMPONENT_HPP__
- #define __ASIO2_IO_CONTEXT_COMPONENT_HPP__
- #if defined(_MSC_VER) && (_MSC_VER >= 1200)
- #pragma once
- #endif
- #include <asio2/base/iopool.hpp>
- namespace asio2::detail
- {
- template<class derived_t, class args_t = void>
- class io_context_cp
- {
- public:
-
- explicit io_context_cp(std::shared_ptr<io_t> rwio) : io_(std::move(rwio))
- {
- }
-
- ~io_context_cp()
- {
- }
-
- inline io_t& io() noexcept
- {
- return *(this->io_);
- }
-
- inline io_t const& io() const noexcept
- {
- return *(this->io_);
- }
-
- inline std::shared_ptr<io_t> io_ptr() noexcept
- {
- return this->io_;
- }
- protected:
-
-
-
- std::shared_ptr<io_t> io_;
- };
- }
- #endif
|