ROArray

Overview

ROArray forms the base class for all array types defined in your RODL library.

You will usually not instantiate instances of this class itself, but use the descendant classes that will be auto-generated in your _Intf source module for every array defined in your RODL file. These descendant classes will contain strongly-typed properties and methods to access the array elements as defined in your RODL.

ROArray is defined to work very similar to the NSArray class family. However, because specific array implementations will allow either objects or simple data types (such as Integers), it uses the term "Item" rather than "Object" in its method names. Besides this fact, the methods work similar to NSArray and are mostly self-explanatory. The list below contains all methods provided by ROArray, but skips describing them, where obvious.

Location


 

addItem:

- (void) addItem:(nonnull NSObject *)object

Parameters:

  • object:

array

+ (nonnull instancetype) array

array

@property (readonly) nonnull NSArray *array

arrayWithCapacity:

+ (nonnull instancetype) arrayWithCapacity:(NSUInteger)capacity

Parameters:

  • capacity:

arrayWithNSArray:

+ (nonnull instancetype) arrayWithNSArray:(nonnull NSArray *)aArray

Parameters:

  • aArray:

containsItem:

- (BOOL) containsItem:(nonnull id)object

Parameters:

  • object:

count

@property (readonly) NSUInteger count

dealloc

- (void) dealloc

deepCopyWithZone:  deprecated

- (nullable id) deepCopyWithZone:(nullable NSZone *)zone

Parameters:

  • zone:

getAttributeValue:

+ (nullable NSString *) getAttributeValue:(nonnull NSString *)aName

Parameters:

  • aName:

indexOfItem:

- (NSUInteger) indexOfItem:(nonnull id)object

Parameters:

  • object:

init

- (nonnull instancetype) init

initWithCapacity:

- (nonnull instancetype) initWithCapacity:(NSUInteger)capacity

Parameters:

  • capacity:

initWithNSArray:

- (nonnull instancetype) initWithNSArray:(nonnull NSArray *)aArray

Parameters:

  • aArray:

insertItem:atIndex:

- (void) insertItem:(nonnull NSObject *)object atIndex:(NSUInteger)index

Parameters:

  • object:
  • index:

itemAtIndex:

- (nonnull NSObject *) itemAtIndex:(NSUInteger)index

Parameters:

  • index:

itemClass

@property (readonly) Class itemClass

itemEnumerator

@property (readonly) nonnull NSEnumerator *itemEnumerator

itemTypeName

@property (readonly) nonnull NSString *itemTypeName

readFromMessage:withName:andCount:

- (void) readFromMessage:(nonnull ROMessage *)aMessage withName:(nullable NSString *)aName andCount:(NSUInteger)count

Parameters:

  • aMessage:
  • aName:
  • count:

readItemFromCoder:forKey:toIndex:

- (void) readItemFromCoder:(nonnull NSCoder *)decoder forKey:(nonnull NSString *)aKey toIndex:(NSUInteger)i

Parameters:

  • decoder:
  • aKey:
  • i:

readItemFromMessage:toIndex:

- (void) readItemFromMessage:(nonnull ROMessage *)aMessage toIndex:(NSUInteger)i

Parameters:

  • aMessage:
  • i:

reinitWithCapacity:

Reallocates new storage for the array with the given capacity. Use this method to avoid unnecessary reallocations as the array grows, if you already know the final number of elements.

- (void) reinitWithCapacity:(NSUInteger)capacity

Parameters:

  • capacity:

removeAllItems

...

- (void) removeAllItems

removeItem:

- (void) removeItem:(nonnull id)object

Parameters:

  • object:

removeItemAtIndex:

...

- (void) removeItemAtIndex:(NSUInteger)index

Parameters:

  • index:

removeLastItem

...

- (void) removeLastItem

replaceItemAtIndex:withItem:

- (void) replaceItemAtIndex:(NSUInteger)index withItem:(nonnull NSObject *)object

Parameters:

  • index:
  • object:

sortUsingDescriptors:

- (void) sortUsingDescriptors:(nonnull NSArray *)sortDescriptors

Parameters:

  • sortDescriptors:

writeItemToCoder:forKey:fromIndex:

- (void) writeItemToCoder:(nonnull NSCoder *)encoder forKey:(nonnull NSString *)aKey fromIndex:(NSUInteger)i

Parameters:

  • encoder:
  • aKey:
  • i:

writeItemToMessage:fromIndex:

- (void) writeItemToMessage:(nonnull ROMessage *)aMessage fromIndex:(NSUInteger)i

Parameters:

  • aMessage:
  • i:

writeToMessage:withName:

- (void) writeToMessage:(nonnull ROMessage *)aMessage withName:(nullable NSString *)aName

Parameters:

  • aMessage:
  • aName:

 

array

@property (readonly) nonnull NSArray *array

count

@property (readonly) NSUInteger count

itemClass

@property (readonly) Class itemClass

itemEnumerator

@property (readonly) nonnull NSEnumerator *itemEnumerator

itemTypeName

@property (readonly) nonnull NSString *itemTypeName

 

array

+ (nonnull instancetype) array

arrayWithCapacity:

+ (nonnull instancetype) arrayWithCapacity:(NSUInteger)capacity

Parameters:

  • capacity:

arrayWithNSArray:

+ (nonnull instancetype) arrayWithNSArray:(nonnull NSArray *)aArray

Parameters:

  • aArray:

getAttributeValue:

+ (nullable NSString *) getAttributeValue:(nonnull NSString *)aName

Parameters:

  • aName:

 

addItem:

- (void) addItem:(nonnull NSObject *)object

Parameters:

  • object:

containsItem:

- (BOOL) containsItem:(nonnull id)object

Parameters:

  • object:

dealloc

- (void) dealloc

deepCopyWithZone:  deprecated

- (nullable id) deepCopyWithZone:(nullable NSZone *)zone

Parameters:

  • zone:

indexOfItem:

- (NSUInteger) indexOfItem:(nonnull id)object

Parameters:

  • object:

init

- (nonnull instancetype) init

initWithCapacity:

- (nonnull instancetype) initWithCapacity:(NSUInteger)capacity

Parameters:

  • capacity:

initWithNSArray:

- (nonnull instancetype) initWithNSArray:(nonnull NSArray *)aArray

Parameters:

  • aArray:

insertItem:atIndex:

- (void) insertItem:(nonnull NSObject *)object atIndex:(NSUInteger)index

Parameters:

  • object:
  • index:

itemAtIndex:

- (nonnull NSObject *) itemAtIndex:(NSUInteger)index

Parameters:

  • index:

readFromMessage:withName:andCount:

- (void) readFromMessage:(nonnull ROMessage *)aMessage withName:(nullable NSString *)aName andCount:(NSUInteger)count

Parameters:

  • aMessage:
  • aName:
  • count:

readItemFromCoder:forKey:toIndex:

- (void) readItemFromCoder:(nonnull NSCoder *)decoder forKey:(nonnull NSString *)aKey toIndex:(NSUInteger)i

Parameters:

  • decoder:
  • aKey:
  • i:

readItemFromMessage:toIndex:

- (void) readItemFromMessage:(nonnull ROMessage *)aMessage toIndex:(NSUInteger)i

Parameters:

  • aMessage:
  • i:

reinitWithCapacity:

Reallocates new storage for the array with the given capacity. Use this method to avoid unnecessary reallocations as the array grows, if you already know the final number of elements.

- (void) reinitWithCapacity:(NSUInteger)capacity

Parameters:

  • capacity:

removeAllItems

...

- (void) removeAllItems

removeItem:

- (void) removeItem:(nonnull id)object

Parameters:

  • object:

removeItemAtIndex:

...

- (void) removeItemAtIndex:(NSUInteger)index

Parameters:

  • index:

removeLastItem

...

- (void) removeLastItem

replaceItemAtIndex:withItem:

- (void) replaceItemAtIndex:(NSUInteger)index withItem:(nonnull NSObject *)object

Parameters:

  • index:
  • object:

sortUsingDescriptors:

- (void) sortUsingDescriptors:(nonnull NSArray *)sortDescriptors

Parameters:

  • sortDescriptors:

writeItemToCoder:forKey:fromIndex:

- (void) writeItemToCoder:(nonnull NSCoder *)encoder forKey:(nonnull NSString *)aKey fromIndex:(NSUInteger)i

Parameters:

  • encoder:
  • aKey:
  • i:

writeItemToMessage:fromIndex:

- (void) writeItemToMessage:(nonnull ROMessage *)aMessage fromIndex:(NSUInteger)i

Parameters:

  • aMessage:
  • i:

writeToMessage:withName:

- (void) writeToMessage:(nonnull ROMessage *)aMessage withName:(nullable NSString *)aName

Parameters:

  • aMessage:
  • aName: