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
- Reference: ROTypes.h
- Namespace: RemObjectsSDK
- Ancestry: NSObject | ROArray
addItem:
Adds the given element to the array.
- (void) addItem:(NSObject *)object
Parameters:
- object:
array
Creates and returns a new, empty array instance.
+ (id) array
array
Creates and returns a new, empty array instance.
@property (readonly) NSArray *array
arrayWithCapacity:
Creates a new array instance and allocates storage for the given capacity. Use this method to avoid unnecessary reallocations as the array grows, if you already know the final number of elements.
+ (id) arrayWithCapacity:(NSUInteger)capacity
Parameters:
- capacity:
arrayWithNSArray:
Creates a new array instance with data from the passed NSArray. It is assumed that all elements of the NSArray are of the appropriate type; this will not be checked or enforced at runtime.
+ (id) arrayWithNSArray:(NSArray *)aArray
Parameters:
- aArray:
containsItem:
- (BOOL) containsItem:(id)object
Parameters:
- object:
count
...
- (NSUInteger) count
dealloc
- (void) dealloc
deepCopyWithZone: deprecated
- (id) deepCopyWithZone:(NSZone *)zone
Parameters:
- zone:
getAttributeValue:
+ (NSString *) getAttributeValue:(NSString *)aName
Parameters:
- aName:
indexOfItem:
...
- (NSUInteger) indexOfItem:(id)object
Parameters:
- object:
init
Initializes a new array instance.
- (id) init
initWithCapacity:
Initializes a new array instance and allocates storage for the given capacity. Use this method to avoid unnecessary reallocations as the array grows, if you already know the final number of elements.
- (id) initWithCapacity:(NSUInteger)capacity
Parameters:
- capacity:
initWithNSArray:
Initializes a new array instance with data from the passed NSArray. It is assumed that all elements of the NSArray are of the appropriate type; this will not be checked or enforced at runtime.
- (id) initWithNSArray:(NSArray *)aArray
Parameters:
- aArray:
insertItem:atIndex:
Inserts an element into the array at the given index.
- (void) insertItem:(NSObject *)object atIndex:(NSUInteger)index
Parameters:
- object:
- index:
itemAtIndex:
...
- (NSObject *) itemAtIndex:(NSUInteger)index
Parameters:
- index:
itemClass
returns the Objective-C Class
of items that the specific ROArray descendant is made to contain, or nil if the array contains non-object types.
- (Class) itemClass
itemEnumerator
...
- (NSEnumerator *) itemEnumerator
itemTypeName
- (NSString *) itemTypeName
readFromMessage:withName:andCount:
For internal use, used by the RO/OSX framework to stream the array contents from a message packet.
- (void) readFromMessage:(ROMessage *)aMessage withName:(NSString *)aName andCount:(int)count
Parameters:
- aMessage:
- aName:
- count:
readItemFromCoder:forKey:toIndex:
- (void) readItemFromCoder:(NSCoder *)decoder forKey:(NSString *)aKey toIndex:(int)i
Parameters:
- decoder:
- aKey:
- i:
readItemFromMessage:toIndex:
For internal use, used by the RO/OSX framework to stream the individual items from a message packet.
- (void) readItemFromMessage:(ROMessage *)aMessage toIndex:(int)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:(id)object
Parameters:
- object:
removeItemAtIndex:
...
- (void) removeItemAtIndex:(NSUInteger)index
Parameters:
- index:
removeLastItem
...
- (void) removeLastItem
replaceItemAtIndex:withItem:
...
- (void) replaceItemAtIndex:(NSUInteger)index withItem:(NSObject *)object
Parameters:
- index:
- object:
sortUsingDescriptors:
- (void) sortUsingDescriptors:(NSArray *)sortDescriptors
Parameters:
- sortDescriptors:
writeItemToCoder:forKey:fromIndex:
- (void) writeItemToCoder:(NSCoder *)encoder forKey:(NSString *)aKey fromIndex:(int)i
Parameters:
- encoder:
- aKey:
- i:
writeItemToMessage:fromIndex:
For internal use, used by the RO/OSX framework to stream the individual items to a message packet.
- (void) writeItemToMessage:(ROMessage *)aMessage fromIndex:(int)i
Parameters:
- aMessage:
- i:
writeToMessage:withName:
For internal use, used by the RO/OSX framework to stream the array contents to a message packet.
- (void) writeToMessage:(ROMessage *)aMessage withName:(NSString *)aName
Parameters:
- aMessage:
- aName:
array
Creates and returns a new, empty array instance.
@property (readonly) NSArray *array
array
Creates and returns a new, empty array instance.
+ (id) array
arrayWithCapacity:
Creates a new array instance and allocates storage for the given capacity. Use this method to avoid unnecessary reallocations as the array grows, if you already know the final number of elements.
+ (id) arrayWithCapacity:(NSUInteger)capacity
Parameters:
- capacity:
arrayWithNSArray:
Creates a new array instance with data from the passed NSArray. It is assumed that all elements of the NSArray are of the appropriate type; this will not be checked or enforced at runtime.
+ (id) arrayWithNSArray:(NSArray *)aArray
Parameters:
- aArray:
getAttributeValue:
+ (NSString *) getAttributeValue:(NSString *)aName
Parameters:
- aName:
addItem:
Adds the given element to the array.
- (void) addItem:(NSObject *)object
Parameters:
- object:
containsItem:
- (BOOL) containsItem:(id)object
Parameters:
- object:
count
...
- (NSUInteger) count
dealloc
- (void) dealloc
deepCopyWithZone: deprecated
- (id) deepCopyWithZone:(NSZone *)zone
Parameters:
- zone:
indexOfItem:
...
- (NSUInteger) indexOfItem:(id)object
Parameters:
- object:
init
Initializes a new array instance.
- (id) init
initWithCapacity:
Initializes a new array instance and allocates storage for the given capacity. Use this method to avoid unnecessary reallocations as the array grows, if you already know the final number of elements.
- (id) initWithCapacity:(NSUInteger)capacity
Parameters:
- capacity:
initWithNSArray:
Initializes a new array instance with data from the passed NSArray. It is assumed that all elements of the NSArray are of the appropriate type; this will not be checked or enforced at runtime.
- (id) initWithNSArray:(NSArray *)aArray
Parameters:
- aArray:
insertItem:atIndex:
Inserts an element into the array at the given index.
- (void) insertItem:(NSObject *)object atIndex:(NSUInteger)index
Parameters:
- object:
- index:
itemAtIndex:
...
- (NSObject *) itemAtIndex:(NSUInteger)index
Parameters:
- index:
itemClass
returns the Objective-C Class
of items that the specific ROArray descendant is made to contain, or nil if the array contains non-object types.
- (Class) itemClass
itemEnumerator
...
- (NSEnumerator *) itemEnumerator
itemTypeName
- (NSString *) itemTypeName
readFromMessage:withName:andCount:
For internal use, used by the RO/OSX framework to stream the array contents from a message packet.
- (void) readFromMessage:(ROMessage *)aMessage withName:(NSString *)aName andCount:(int)count
Parameters:
- aMessage:
- aName:
- count:
readItemFromCoder:forKey:toIndex:
- (void) readItemFromCoder:(NSCoder *)decoder forKey:(NSString *)aKey toIndex:(int)i
Parameters:
- decoder:
- aKey:
- i:
readItemFromMessage:toIndex:
For internal use, used by the RO/OSX framework to stream the individual items from a message packet.
- (void) readItemFromMessage:(ROMessage *)aMessage toIndex:(int)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:(id)object
Parameters:
- object:
removeItemAtIndex:
...
- (void) removeItemAtIndex:(NSUInteger)index
Parameters:
- index:
removeLastItem
...
- (void) removeLastItem
replaceItemAtIndex:withItem:
...
- (void) replaceItemAtIndex:(NSUInteger)index withItem:(NSObject *)object
Parameters:
- index:
- object:
sortUsingDescriptors:
- (void) sortUsingDescriptors:(NSArray *)sortDescriptors
Parameters:
- sortDescriptors:
writeItemToCoder:forKey:fromIndex:
- (void) writeItemToCoder:(NSCoder *)encoder forKey:(NSString *)aKey fromIndex:(int)i
Parameters:
- encoder:
- aKey:
- i:
writeItemToMessage:fromIndex:
For internal use, used by the RO/OSX framework to stream the individual items to a message packet.
- (void) writeItemToMessage:(ROMessage *)aMessage fromIndex:(int)i
Parameters:
- aMessage:
- i:
writeToMessage:withName:
For internal use, used by the RO/OSX framework to stream the array contents to a message packet.
- (void) writeToMessage:(ROMessage *)aMessage withName:(NSString *)aName
Parameters:
- aMessage:
- aName: