ProtocolMapper.hpp 914 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2022-11-17
  6. * Changed: 2022-11-17
  7. *
  8. * */
  9. #ifndef LS_STD_PROTOCOL_MAPPER_HPP
  10. #define LS_STD_PROTOCOL_MAPPER_HPP
  11. #include <ls_std/os/dynamic_goal.hpp>
  12. #include <ls_std/core/Class.hpp>
  13. #include "Protocol.hpp"
  14. #include "ProtocolType.hpp"
  15. namespace ls::std::network
  16. {
  17. class LS_STD_DYNAMIC_GOAL ProtocolMapper : public ls::std::core::Class
  18. {
  19. public:
  20. ProtocolMapper();
  21. ~ProtocolMapper() override = default;
  22. [[nodiscard]] static ls::std::network::Protocol from(const ls::std::network::ProtocolType& _protocolType);
  23. private:
  24. #if defined(unix) || defined(__APPLE__)
  25. [[nodiscard]] static ls::std::network::Protocol _toUnixProtocol(const ls::std::network::ProtocolType& _protocolType);
  26. #endif
  27. };
  28. }
  29. #endif