ImmutablePair.h 688 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. namespace Framework
  3. {
  4. template<typename First, typename Second> class ImmutablePair
  5. {
  6. private:
  7. First first;
  8. Second second;
  9. public:
  10. ImmutablePair() {}
  11. ImmutablePair(const First& first, const Second& second)
  12. : first(first),
  13. second(second)
  14. {}
  15. ImmutablePair(const ImmutablePair<First, Second>& other)
  16. : first(other.first),
  17. second(other.second)
  18. {}
  19. const First& getFirst() const
  20. {
  21. return first;
  22. }
  23. const Second& getSecond() const
  24. {
  25. return second;
  26. }
  27. };
  28. } // namespace Framework