ProtocolFamilyMapper.hpp 1.0 KB

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