PropertiesIteratorView.cpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #include "../../Include/RmlUi/Core/PropertiesIteratorView.h"
  2. #include "../../Include/RmlUi/Core/StyleSheetSpecification.h"
  3. #include "PropertiesIterator.h"
  4. namespace Rml {
  5. PropertiesIteratorView::PropertiesIteratorView(UniquePtr<PropertiesIterator> ptr) : ptr(std::move(ptr)) {}
  6. PropertiesIteratorView::PropertiesIteratorView(PropertiesIteratorView&& other) noexcept : ptr(std::move(other.ptr)) {}
  7. PropertiesIteratorView& PropertiesIteratorView::operator=(PropertiesIteratorView&& other) noexcept
  8. {
  9. ptr = std::move(other.ptr);
  10. return *this;
  11. }
  12. PropertiesIteratorView::~PropertiesIteratorView() {}
  13. PropertiesIteratorView& PropertiesIteratorView::operator++()
  14. {
  15. ++(*ptr);
  16. return *this;
  17. }
  18. PropertyId PropertiesIteratorView::GetId() const
  19. {
  20. return (*(*ptr)).first;
  21. }
  22. const String& PropertiesIteratorView::GetName() const
  23. {
  24. return StyleSheetSpecification::GetPropertyName(GetId());
  25. }
  26. const Property& PropertiesIteratorView::GetProperty() const
  27. {
  28. return (*(*ptr)).second;
  29. }
  30. bool PropertiesIteratorView::AtEnd() const
  31. {
  32. return ptr->AtEnd();
  33. }
  34. } // namespace Rml