QualifiedName.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2020, the SerenityOS developers.
  3. * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <AK/DeprecatedFlyString.h>
  9. namespace Web::DOM {
  10. class QualifiedName {
  11. public:
  12. QualifiedName(DeprecatedFlyString const& local_name, DeprecatedFlyString const& prefix, DeprecatedFlyString const& namespace_);
  13. DeprecatedFlyString const& local_name() const { return m_impl->local_name; }
  14. DeprecatedFlyString const& prefix() const { return m_impl->prefix; }
  15. DeprecatedFlyString const& namespace_() const { return m_impl->namespace_; }
  16. DeprecatedString const& as_string() const { return m_impl->as_string; }
  17. struct Impl : public RefCounted<Impl> {
  18. Impl(DeprecatedFlyString const& local_name, DeprecatedFlyString const& prefix, DeprecatedFlyString const& namespace_);
  19. ~Impl();
  20. void make_internal_string();
  21. DeprecatedFlyString local_name;
  22. DeprecatedFlyString prefix;
  23. DeprecatedFlyString namespace_;
  24. DeprecatedString as_string;
  25. };
  26. void set_prefix(DeprecatedFlyString const& value);
  27. private:
  28. NonnullRefPtr<Impl> m_impl;
  29. };
  30. }