diff options
author | zxu <zxu@google.com> | 2018-03-05 11:30:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-05 11:30:59 -0500 |
commit | 1c40e7aada6b32bbc621f06fb5f380149606a58d (patch) | |
tree | 6dee81f74f8a33d1beae915d9227caf28b8e2598 /Firestore/Source/Model/FSTPath.h | |
parent | 9b5b4d876eb77e65b3246614855088be101eebf3 (diff) |
add converters and port paths to FSTQuery (#869)
* add converters and fix FSTQuery.{h,m} only
* address changes
* a change forget to address
* add a dummy function to make inline-only-library buildable
Diffstat (limited to 'Firestore/Source/Model/FSTPath.h')
-rw-r--r-- | Firestore/Source/Model/FSTPath.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Firestore/Source/Model/FSTPath.h b/Firestore/Source/Model/FSTPath.h index 1f63f17..f127156 100644 --- a/Firestore/Source/Model/FSTPath.h +++ b/Firestore/Source/Model/FSTPath.h @@ -16,6 +16,9 @@ #import <Foundation/Foundation.h> +#include "Firestore/core/src/firebase/firestore/model/field_path.h" +#include "Firestore/core/src/firebase/firestore/model/resource_path.h" + NS_ASSUME_NONNULL_BEGIN /** @@ -113,6 +116,17 @@ NS_ASSUME_NONNULL_BEGIN /** Returns YES if this is the `FSTFieldPath.keyFieldPath` field path. */ - (BOOL)isKeyFieldPath; +/** Creates and returns a new path from C++ FieldPath. + * + * @param fieldPath A C++ FieldPath. + */ ++ (instancetype)fieldPathWithCPPFieldPath:(const firebase::firestore::model::FieldPath &)fieldPath; + +/** + * Creates and returns a new C++ FieldPath. + */ +- (firebase::firestore::model::FieldPath)toCPPFieldPath; + @end /** A slash-separated path for navigating resources (documents and collections) within Firestore. */ @@ -136,6 +150,18 @@ NS_ASSUME_NONNULL_BEGIN * @param resourcePath A slash-separated string representing the path. */ + (instancetype)pathWithString:(NSString *)resourcePath; + +/** Creates and returns a new path from C++ ResourcePath. + * + * @param resourcePath A C++ ResourcePath. + */ ++ (instancetype)resourcePathWithCPPResourcePath: + (const firebase::firestore::model::ResourcePath &)resourcePath; + +/** + * Creates and returns a new C++ ResourcePath. + */ +- (firebase::firestore::model::ResourcePath)toCPPResourcePath; @end NS_ASSUME_NONNULL_END |