DABin2StreamElementInfo

Overview

The DABin2StreamElementInfo class represents a particular element in the stream created by the DABin2DataStreamer.

You can think of DABin2StreamElementInfo as an element of the TOC (table of contents) of the stream -it holds the element name, its type (DADataTable or DADelta) and the position of the element inside the stream.

In most cases you don't need to deal with this class directly. It is used internally by DABin2DataStreamer.

Location

 

initWithType:andName:andOffset:

- (InstanceType) initWithType:(enum DAStreamElementType)type andName:(NSString *)name andOffset:(int)offset

Parameters:

  • type:
  • name:
  • offset:

key

Returns the key of the element. The key is equal to the element name prefixed with 't#' or 'd#', depending on the element type. The key value is used in the elements dictionary inside DABin2DataStreamer. It allows the dictionary to keep both table and delta in the same stream (which is why we cannot use the element.name property for that, since delta and table have the same name).

- (NSString *) key

name

Returns the name of the element (i.e. the name of the table or delta).

@property (readonly) NSString *name

offset

Returns the given element offset in the stream in bytes.

@property (readonly) int offset

type

Returns the type of the element. It can be Table or Delta.

@property (readonly) enum DAStreamElementType type

writeTo:

This method allows the element to write itself to the stream.

- (void) writeTo:(ROBinReaderWriter *)writer

Parameters:

  • writer: Instance of ROBinReaderWriter that is in charge of writing data into the stream.

 

name

Returns the name of the element (i.e. the name of the table or delta).

@property (readonly) NSString *name

offset

Returns the given element offset in the stream in bytes.

@property (readonly) int offset

type

Returns the type of the element. It can be Table or Delta.

@property (readonly) enum DAStreamElementType type

 

initWithType:andName:andOffset:

- (InstanceType) initWithType:(enum DAStreamElementType)type andName:(NSString *)name andOffset:(int)offset

Parameters:

  • type:
  • name:
  • offset:

key

Returns the key of the element. The key is equal to the element name prefixed with 't#' or 'd#', depending on the element type. The key value is used in the elements dictionary inside DABin2DataStreamer. It allows the dictionary to keep both table and delta in the same stream (which is why we cannot use the element.name property for that, since delta and table have the same name).

- (NSString *) key

writeTo:

This method allows the element to write itself to the stream.

- (void) writeTo:(ROBinReaderWriter *)writer

Parameters:

  • writer: Instance of ROBinReaderWriter that is in charge of writing data into the stream.