unordered_map 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /**
  2. * PANDA 3D SOFTWARE
  3. * Copyright (c) Carnegie Mellon University. All rights reserved.
  4. *
  5. * All use of this software is subject to the terms of the revised BSD
  6. * license. You should have received a copy of this license along
  7. * with this source code in a file named "LICENSE."
  8. *
  9. * @file unordered_map
  10. * @author tobspr
  11. * @date 2016-11-01
  12. */
  13. // This file, and all the other files in this directory, aren't
  14. // intended to be compiled--they're just parsed by CPPParser (and
  15. // interrogate) in lieu of the actual system headers, to generate the
  16. // interrogate database.
  17. #ifndef UNORDERED_MAP_H
  18. #define UNORDERED_MAP_H
  19. #include <stdtypedefs.h>
  20. #include <stdcompare.h>
  21. #include <pair>
  22. #include <initializer_list>
  23. #include <functional>
  24. #include <memory>
  25. namespace std {
  26. template <class Key,
  27. class T,
  28. class Hash = hash<Key>,
  29. class Pred = std::equal_to<Key>,
  30. class Allocator = std::allocator<std::pair<const Key, T> > >
  31. class unordered_map
  32. {
  33. public:
  34. // types
  35. typedef Key key_type;
  36. typedef Key value_type;
  37. typedef Hash hasher;
  38. typedef Pred key_equal;
  39. typedef Allocator allocator_type;
  40. typedef typename allocator_type::pointer pointer;
  41. typedef typename allocator_type::const_pointer const_pointer;
  42. typedef typename allocator_type::reference reference;
  43. typedef typename allocator_type::const_reference const_reference;
  44. typedef size_t size_type;
  45. typedef std::ptrdiff_t difference_type;
  46. class iterator;
  47. class const_iterator;
  48. class local_iterator;
  49. class const_local_iterator;
  50. };
  51. template <class Key,
  52. class T,
  53. class Hash = hash<Key>,
  54. class Pred = std::equal_to<Key>,
  55. class Allocator = std::allocator<std::pair<const Key, T> > >
  56. class unordered_multimap
  57. {
  58. public:
  59. // types
  60. typedef Key key_type;
  61. typedef Key value_type;
  62. typedef Hash hasher;
  63. typedef Pred key_equal;
  64. typedef Allocator allocator_type;
  65. typedef typename allocator_type::pointer pointer;
  66. typedef typename allocator_type::const_pointer const_pointer;
  67. typedef typename allocator_type::reference reference;
  68. typedef typename allocator_type::const_reference const_reference;
  69. typedef size_t size_type;
  70. typedef std::ptrdiff_t difference_type;
  71. class iterator;
  72. class const_iterator;
  73. class local_iterator;
  74. class const_local_iterator;
  75. };
  76. } // namespace std
  77. #endif