Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added missing NSOrderedSet methods (insert, remove, replace, etc) per…

… Issue #75 comments.
  • Loading branch information...
commit 13a363000a7820179e9bd340ec0f35aad1a9d4a2 1 parent e8a05a3
Joshua Greene authored
17 templates/machine.h.motemplate
@@ -115,14 +115,27 @@ extern const struct <$managedObjectClassName$>UserInfo {<$foreach UserInfo userI
115 115 <$endif$>
116 116 @end
117 117
118   -<$foreach Relationship noninheritedRelationships do$><$if Relationship.isToMany$>
  118 +<$foreach Relationship noninheritedRelationships do$>
  119 +<$if Relationship.isToMany$>
119 120 @interface _<$managedObjectClassName$> (<$Relationship.name.initialCapitalString$>CoreDataGeneratedAccessors)
120 121 - (void)add<$Relationship.name.initialCapitalString$>:(<$Relationship.immutableCollectionClassName$>*)value_;
121 122 - (void)remove<$Relationship.name.initialCapitalString$>:(<$Relationship.immutableCollectionClassName$>*)value_;
122 123 - (void)add<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_;
123 124 - (void)remove<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_;
  125 +
  126 +<$if Relationship.isOrdered$>
  127 +- (void)insertObject:(<$Relationship.immutableCollectionClassName$>*)value in<$Relationship.name.initialCapitalString$>AtIndex:(NSUInteger)idx;
  128 +- (void)removeObjectFrom<$Relationship.name.initialCapitalString$>AtIndex:(NSUInteger)idx;
  129 +- (void)insert<$Relationship.name.initialCapitalString$>:(NSArray *)value atIndexes:(NSIndexSet *)indexes;
  130 +- (void)remove<$Relationship.name.initialCapitalString$>AtIndexes:(NSIndexSet *)indexes;
  131 +- (void)replaceObjectIn<$Relationship.name.initialCapitalString$>AtIndex:(NSUInteger)idx withObject:(<$Relationship.immutableCollectionClassName$>*)value;
  132 +- (void)replace<$Relationship.name.initialCapitalString$>AtIndexes:(NSIndexSet *)indexes with<$Relationship.name.initialCapitalString$>:(NSArray *)values;
  133 +<$endif$>
  134 +
124 135 @end
125   -<$endif$><$endforeach do$>
  136 +<$endif$>
  137 +
  138 +<$endforeach do$>
126 139
127 140 @interface _<$managedObjectClassName$> (CoreDataGeneratedPrimitiveAccessors)
128 141 <$foreach Attribute noninheritedAttributesSansType do$>
18 templates/machine.m.motemplate
@@ -243,6 +243,24 @@ const struct <$managedObjectClassName$>UserInfo <$managedObjectClassName$>UserIn
243 243 - (void)remove<$Relationship.name.initialCapitalString$>Object:(<$Relationship.destinationEntity.managedObjectClassName$>*)value_ {
244 244 [self.<$Relationship.name$>Set removeObject:value_];
245 245 }
  246 +- (void)insertObject:(<$Relationship.immutableCollectionClassName$>*)value in<$Relationship.name.initialCapitalString$>AtIndex:(NSUInteger)idx {
  247 + [self.<$Relationship.name$>Set insertObject:value atIndex:idx];
  248 +}
  249 +- (void)removeObjectFrom<$Relationship.name.initialCapitalString$>AtIndex:(NSUInteger)idx {
  250 + [self.<$Relationship.name$>Set removeObjectAtIndex:idx];
  251 +}
  252 +- (void)insert<$Relationship.name.initialCapitalString$>:(NSArray *)value atIndexes:(NSIndexSet *)indexes {
  253 + [self.<$Relationship.name$>Set insertObjects:value atIndexes:indexes];
  254 +}
  255 +- (void)remove<$Relationship.name.initialCapitalString$>AtIndexes:(NSIndexSet *)indexes {
  256 + [self.<$Relationship.name$>Set removeObjectsAtIndexes:indexes];
  257 +}
  258 +- (void)replaceObjectIn<$Relationship.name.initialCapitalString$>AtIndex:(NSUInteger)idx withObject:(<$Relationship.immutableCollectionClassName$>*)value {
  259 + [self.<$Relationship.name$>Set replaceObjectAtIndex:idx withObject:value];
  260 +}
  261 +- (void)replace<$Relationship.name.initialCapitalString$>AtIndexes:(NSIndexSet *)indexes with<$Relationship.name.initialCapitalString$>:(NSArray *)value {
  262 + [self.<$Relationship.name$>Set replaceObjectsAtIndexes:indexes withObjects:value];
  263 +}
246 264 @end
247 265 <$endif$><$endif$><$endforeach do$>
248 266

0 comments on commit 13a3630

Please sign in to comment.
Something went wrong with that request. Please try again.