RLMSectionedResults_Private.hpp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. ////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2022 Realm Inc.
  4. //
  5. // Licensed under the Apache License, Version 2.0 (the "License");
  6. // you may not use this file except in compliance with the License.
  7. // You may obtain a copy of the License at
  8. //
  9. // http://www.apache.org/licenses/LICENSE-2.0
  10. //
  11. // Unless required by applicable law or agreed to in writing, software
  12. // distributed under the License is distributed on an "AS IS" BASIS,
  13. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. // See the License for the specific language governing permissions and
  15. // limitations under the License.
  16. //
  17. ////////////////////////////////////////////////////////////////////////////
  18. #import "RLMClassInfo.hpp"
  19. #import "RLMSectionedResults.h"
  20. #import <realm/object-store/results.hpp>
  21. #import <realm/object-store/sectioned_results.hpp>
  22. @protocol RLMValue;
  23. RLM_HEADER_AUDIT_BEGIN(nullability, sendability)
  24. RLM_HIDDEN_BEGIN
  25. RLM_DIRECT_MEMBERS
  26. @interface RLMSectionedResultsChange ()
  27. - (instancetype)initWithChanges:(realm::SectionedResultsChangeSet)indices;
  28. @end
  29. RLM_DIRECT_MEMBERS
  30. @interface RLMSectionedResultsEnumerator : NSObject
  31. - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state
  32. count:(NSUInteger)len;
  33. - (instancetype)initWithSectionedResults:(RLMSectionedResults *)sectionedResults;
  34. - (instancetype)initWithResultsSection:(RLMSection *)resultsSection;
  35. @end
  36. @interface RLMSectionedResults ()
  37. - (instancetype)initWithResults:(RLMResults *)results
  38. keyBlock:(RLMSectionedResultsKeyBlock)keyBlock;
  39. - (RLMSectionedResultsEnumerator *)fastEnumerator;
  40. - (RLMClassInfo *)objectInfo;
  41. - (RLMSectionedResults *)snapshot;
  42. NSUInteger RLMFastEnumerate(NSFastEnumerationState *state,
  43. NSUInteger len,
  44. RLMSectionedResults *collection);
  45. @end
  46. @interface RLMSection ()
  47. - (instancetype)initWithResultsSection:(realm::ResultsSection&&)resultsSection
  48. parent:(RLMSectionedResults *)parent;
  49. - (RLMSectionedResultsEnumerator *)fastEnumerator;
  50. - (RLMClassInfo *)objectInfo;
  51. NSUInteger RLMFastEnumerate(NSFastEnumerationState *state,
  52. NSUInteger len,
  53. RLMSection *collection);
  54. @end
  55. RLM_HIDDEN_END
  56. RLM_HEADER_AUDIT_END(nullability, sendability)