diff options
author | zxu <zxu@google.com> | 2018-03-06 14:28:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-06 14:28:04 -0500 |
commit | 8311c6432ecff78bedd13e27f64d241659324786 (patch) | |
tree | 982484ba69cf17172ee4e1308254a0b76894b7d5 /Firestore/Source/Model/FSTDocumentKey.h | |
parent | 34ebf10b0acc65f1924d723e82085d4104bc281d (diff) |
port paths to FSTDocumentKey (#877)
* replace path with C++ implementation in FSTDocumentKey.{h,mm} only
* address changes
* address changes
Diffstat (limited to 'Firestore/Source/Model/FSTDocumentKey.h')
-rw-r--r-- | Firestore/Source/Model/FSTDocumentKey.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Firestore/Source/Model/FSTDocumentKey.h b/Firestore/Source/Model/FSTDocumentKey.h index 2af1c9a..dbcff2c 100644 --- a/Firestore/Source/Model/FSTDocumentKey.h +++ b/Firestore/Source/Model/FSTDocumentKey.h @@ -16,7 +16,9 @@ #import <Foundation/Foundation.h> -@class FSTResourcePath; +#include <initializer_list> + +#include "Firestore/core/src/firebase/firestore/model/resource_path.h" NS_ASSUME_NONNULL_BEGIN @@ -29,16 +31,14 @@ NS_ASSUME_NONNULL_BEGIN * @param path The path to the document. * @return A new instance of FSTDocumentKey. */ -+ (instancetype)keyWithPath:(FSTResourcePath *)path; - ++ (instancetype)keyWithPath:(firebase::firestore::model::ResourcePath)path; /** * Creates and returns a new document key with a path with the given segments. * * @param segments The segments of the path to the document. * @return A new instance of FSTDocumentKey. */ -+ (instancetype)keyWithSegments:(NSArray<NSString *> *)segments; - ++ (instancetype)keyWithSegments:(std::initializer_list<std::string>)segments; /** * Creates and returns a new document key from the given resource path string. * @@ -48,13 +48,12 @@ NS_ASSUME_NONNULL_BEGIN + (instancetype)keyWithPathString:(NSString *)resourcePath; /** Returns true iff the given path is a path to a document. */ -+ (BOOL)isDocumentKey:(FSTResourcePath *)path; - ++ (BOOL)isDocumentKey:(const firebase::firestore::model::ResourcePath &)path; - (BOOL)isEqualToKey:(FSTDocumentKey *)other; - (NSComparisonResult)compare:(FSTDocumentKey *)other; /** The path to the document. */ -@property(strong, nonatomic, readonly) FSTResourcePath *path; +- (const firebase::firestore::model::ResourcePath &)path; @end |