KeyValuePair.h 891 B

123456789101112131415161718192021222324252627282930313233
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. namespace JsUtil
  7. {
  8. template <class TKey, class TValue> struct KeyValuePair
  9. {
  10. private:
  11. TKey key;
  12. TValue value;
  13. public:
  14. KeyValuePair()
  15. {
  16. }
  17. KeyValuePair(TKey key, TValue value)
  18. {
  19. this->key = key;
  20. this->value = value;
  21. }
  22. TKey Key() { return key; }
  23. const TKey Key() const { return key; }
  24. TValue Value() { return value; }
  25. const TValue Value() const { return value; }
  26. };
  27. }