FIRAggregateField+Internal.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright 2023 Google LLC
  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 "FIRAggregateField.h"
  17. #import "FIRFieldPath.h"
  18. #include <string>
  19. #include "Firestore/core/src/model/aggregate_alias.h"
  20. #include "Firestore/core/src/model/aggregate_field.h"
  21. namespace model = firebase::firestore::model;
  22. NS_ASSUME_NONNULL_BEGIN
  23. @interface FIRAggregateField (Internal)
  24. - (model::AggregateField)createInternalValue;
  25. - (model::AggregateAlias)createAlias;
  26. - (const std::string)name;
  27. - (const FIRFieldPath *)fieldPath;
  28. @end
  29. /**
  30. * FIRAggregateField class for sum aggregations. Exposed internally so code can do isKindOfClass
  31. * checks on it.
  32. */
  33. @interface FSTSumAggregateField : FIRAggregateField
  34. - (instancetype)init NS_UNAVAILABLE;
  35. - (id)initWithFieldPath:(FIRFieldPath *)fieldPath;
  36. @end
  37. /**
  38. * FIRAggregateField class for average aggregations. Exposed internally so code can do isKindOfClass
  39. * checks on it.
  40. */
  41. @interface FSTAverageAggregateField : FIRAggregateField
  42. - (instancetype)init NS_UNAVAILABLE;
  43. - (instancetype)initWithFieldPath:(FIRFieldPath *)fieldPath;
  44. @end
  45. /**
  46. * FIRAggregateField class for count aggregations. Exposed internally so code can do isKindOfClass
  47. * checks on it.
  48. */
  49. @interface FSTCountAggregateField : FIRAggregateField
  50. - (instancetype)init NS_UNAVAILABLE;
  51. - (instancetype)initPrivate;
  52. @end
  53. NS_ASSUME_NONNULL_END