ProtocolMapper.hpp 938 B

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