UID.hpp 607 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ///
  2. /// \file Util/UID.hpp
  3. ///
  4. /// Unique ID interface class.
  5. ///
  6. /// \copyright
  7. /// Copyright (c) 2014 Josh Blum
  8. /// SPDX-License-Identifier: BSL-1.0
  9. ///
  10. #pragma once
  11. #include <Pothos/Config.hpp>
  12. #include <string>
  13. namespace Pothos {
  14. namespace Util {
  15. /*!
  16. * Represent a universally unique ID.
  17. */
  18. class POTHOS_API UID
  19. {
  20. public:
  21. //! Default constructor
  22. UID(void);
  23. //! Get the UID as a string
  24. const std::string &uid(void) const;
  25. private:
  26. std::string _uid;
  27. };
  28. } //namespace Util
  29. } //namespace Pothos
  30. inline const std::string &Pothos::Util::UID::uid(void) const
  31. {
  32. return _uid;
  33. }