From 0f0a1dab2d385895fc15968cfee3df07b53c52b9 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Tue, 10 Jul 2018 16:08:18 -0400 Subject: Eliminate unnecessary DocumentKey->FSTDocumentKey conversions (#1507) --- Firestore/Source/Model/FSTDocumentKey.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Firestore/Source/Model/FSTDocumentKey.h') diff --git a/Firestore/Source/Model/FSTDocumentKey.h b/Firestore/Source/Model/FSTDocumentKey.h index a403117..ebc88c9 100644 --- a/Firestore/Source/Model/FSTDocumentKey.h +++ b/Firestore/Source/Model/FSTDocumentKey.h @@ -21,6 +21,15 @@ #include "Firestore/core/src/firebase/firestore/model/resource_path.h" +// Using forward declaration to avoid circular dependency (`document_key.h` includes this header).` +namespace firebase { +namespace firestore { +namespace model { +class DocumentKey; +} +} +} + NS_ASSUME_NONNULL_BEGIN /** FSTDocumentKey represents the location of a document in the Firestore database. */ @@ -33,6 +42,8 @@ NS_ASSUME_NONNULL_BEGIN * @return A new instance of FSTDocumentKey. */ + (instancetype)keyWithPath:(firebase::firestore::model::ResourcePath)path; + ++ (instancetype)keyWithDocumentKey:(const firebase::firestore::model::DocumentKey &)documentKey; /** * Creates and returns a new document key with a path with the given segments. * -- cgit v1.2.3