diff options
author | Gil <mcg@google.com> | 2018-05-05 09:00:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-05 09:00:53 -0700 |
commit | 5af6de9e69b86ab94da78b9f889b96517cec47da (patch) | |
tree | 0b8447e1a4e921a38e568ad0aef6cb9aca1997b6 /Firestore/Source/Model/FSTMutationBatch.h | |
parent | a080e481b5e6fcbc2b645920051cf20fc8cad7a7 (diff) |
Migrate FSTDocumentVersionDictionary to C++ DocumentVersionMap (#1231)
Diffstat (limited to 'Firestore/Source/Model/FSTMutationBatch.h')
-rw-r--r-- | Firestore/Source/Model/FSTMutationBatch.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Firestore/Source/Model/FSTMutationBatch.h b/Firestore/Source/Model/FSTMutationBatch.h index f95b145..761a885 100644 --- a/Firestore/Source/Model/FSTMutationBatch.h +++ b/Firestore/Source/Model/FSTMutationBatch.h @@ -16,8 +16,9 @@ #import <Foundation/Foundation.h> +#include <unordered_map> + #import "Firestore/Source/Core/FSTTypes.h" -#import "Firestore/Source/Model/FSTDocumentVersionDictionary.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" @@ -28,6 +29,17 @@ @class FSTMutationResult; @class FSTMutationBatchResult; +namespace firebase { +namespace firestore { +namespace model { + +// TODO(wilhuff): make this type a member of MutationBatchResult once that's a C++ class. +using DocumentVersionMap = std::unordered_map<DocumentKey, SnapshotVersion, DocumentKeyHash>; + +} // namespace model +} // namespace firestore +} // namespace firebase + NS_ASSUME_NONNULL_BEGIN /** @@ -115,7 +127,8 @@ extern const FSTBatchID kFSTBatchIDUnknown; @property(nonatomic, strong, readonly) FSTMutationBatch *batch; @property(nonatomic, strong, readonly) NSArray<FSTMutationResult *> *mutationResults; @property(nonatomic, strong, readonly, nullable) NSData *streamToken; -@property(nonatomic, strong, readonly) FSTDocumentVersionDictionary *docVersions; + +- (const firebase::firestore::model::DocumentVersionMap &)docVersions; @end |