FSTDocumentDictionary.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import "Firestore/third_party/Immutable/FSTImmutableSortedDictionary.h"
  18. @class FSTDocument;
  19. @class FSTDocumentKey;
  20. @class FSTMaybeDocument;
  21. NS_ASSUME_NONNULL_BEGIN
  22. /** Convenience type for a map of keys to MaybeDocuments, since they are so common. */
  23. typedef FSTImmutableSortedDictionary<FSTDocumentKey *, FSTMaybeDocument *>
  24. FSTMaybeDocumentDictionary;
  25. /** Convenience type for a map of keys to Documents, since they are so common. */
  26. typedef FSTImmutableSortedDictionary<FSTDocumentKey *, FSTDocument *> FSTDocumentDictionary;
  27. @interface FSTImmutableSortedDictionary (FSTDocumentDictionary)
  28. /** Returns a new set using the DocumentKeyComparator. */
  29. + (FSTMaybeDocumentDictionary *)maybeDocumentDictionary;
  30. /** Returns a new set using the DocumentKeyComparator. */
  31. + (FSTDocumentDictionary *)documentDictionary;
  32. @end
  33. NS_ASSUME_NONNULL_END