String.Format.BUSID.hpp 770 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "String.Format.tlh"
  3. #include "BUS.BUSID.hpp"
  4. //-----------------------------------------------------------------------------
  5. // 用于格式化 BUSID
  6. //
  7. // #include "String.Format.BUSID.hpp"
  8. //-----------------------------------------------------------------------------
  9. namespace ECOM::Utility::String
  10. {
  11. template <> inline std::string ToString (const ECOM::ServiceBus::BUSID & _val)
  12. {
  13. return std::string (_val.Who (_val));
  14. }
  15. template <> inline std::string ToString (const ECOM::ServiceBus::Detail::ID::unBUSID & _val)
  16. {
  17. return std::string (_val.Who (_val));
  18. }
  19. template <> inline std::string ToString (const ECOM::ServiceBus::Topic & _val)
  20. {
  21. // !!! 暂时不知道怎么格式化成字符串 !!!
  22. return std::string (_val.GetName ());
  23. }
  24. }