ROGuid

Overview

Provides a convenient object-oriented facility to create and store GUID values. GUIDs (also known as UUIDs in Mac Xcode) are 128-bit values guaranteed to be unique.

Location

 

createGuid

+ (ROGuid *) createGuid

data

Returns a binary data object containing the copy of the currently stored GUID value.

- (NSData *) data

guid

This method is used to create a new ROGuid instance and initialize it with a newly generated GUID value.

+ (ROGuid *) guid

guidWithBytes:

This method creates a new ROGuid instance and initializes it with the content of the given bytes array. The data object should contain at least 128 bits (16 bytes) of data.

+ (ROGuid *) guidWithBytes:(char *)aBytes

Parameters:

  • aBytes: The pointer to bytes set containing GUID data.

guidWithData:

This method creates a new ROGuid instance and initializes it with the content of the given binary data object. The data object should contain at least 128 bits of data. This method can be used to deserialize GUIDs from the binary stream.

+ (ROGuid *) guidWithData:(NSData *)aData

Parameters:

  • aData: The data object containing GUID data.

guidWithString:

This method creates a new ROGuid instance and initializes it with the value equivalent to the given string representation. The standard format for GUIDs represented as string is a string punctuated by hyphens, for example: 68753A44-4D6F-1226-9C60-0050E4C00067.

+ (ROGuid *) guidWithString:(NSString *)aString

Parameters:

  • aString: String representation of the GUID.

initWithBytes:

initializes ROGuid instance with the content of the given bytes array. The data object should contain at least 128 bits (16 bytes) of data.

- (id) initWithBytes:(char *)aBytes

Parameters:

  • aBytes: The pointer to bytes set containing GUID data.

initWithData:

initializes ROGuid instance with the content of the given binary data object. The data object should contain at least 128 bits of data.

- (id) initWithData:(NSData *)aData

Parameters:

  • aData: The data object containing GUID data.

initWithNew

Generates a new GUID and initializes the object with it.

- (id) initWithNew

initWithString:

Initializes the object with the GUID value equivalent to the given string representation. The standard format for GUIDs represented as string is a string punctuated by hyphens, for example: 68753A44-4D6F-1226-9C60-0050E4C00067.

- (id) initWithString:(NSString *)aString

Parameters:

  • aString: String representation of the GUID.

stringValue

Returns the string representation of the currently stored GUID value. The string will be formatted according to the common GUID string formatting rule, as described above.

- (NSString *) stringValue

 

createGuid

+ (ROGuid *) createGuid

guid

This method is used to create a new ROGuid instance and initialize it with a newly generated GUID value.

+ (ROGuid *) guid

guidWithBytes:

This method creates a new ROGuid instance and initializes it with the content of the given bytes array. The data object should contain at least 128 bits (16 bytes) of data.

+ (ROGuid *) guidWithBytes:(char *)aBytes

Parameters:

  • aBytes: The pointer to bytes set containing GUID data.

guidWithData:

This method creates a new ROGuid instance and initializes it with the content of the given binary data object. The data object should contain at least 128 bits of data. This method can be used to deserialize GUIDs from the binary stream.

+ (ROGuid *) guidWithData:(NSData *)aData

Parameters:

  • aData: The data object containing GUID data.

guidWithString:

This method creates a new ROGuid instance and initializes it with the value equivalent to the given string representation. The standard format for GUIDs represented as string is a string punctuated by hyphens, for example: 68753A44-4D6F-1226-9C60-0050E4C00067.

+ (ROGuid *) guidWithString:(NSString *)aString

Parameters:

  • aString: String representation of the GUID.

 

data

Returns a binary data object containing the copy of the currently stored GUID value.

- (NSData *) data

initWithBytes:

initializes ROGuid instance with the content of the given bytes array. The data object should contain at least 128 bits (16 bytes) of data.

- (id) initWithBytes:(char *)aBytes

Parameters:

  • aBytes: The pointer to bytes set containing GUID data.

initWithData:

initializes ROGuid instance with the content of the given binary data object. The data object should contain at least 128 bits of data.

- (id) initWithData:(NSData *)aData

Parameters:

  • aData: The data object containing GUID data.

initWithNew

Generates a new GUID and initializes the object with it.

- (id) initWithNew

initWithString:

Initializes the object with the GUID value equivalent to the given string representation. The standard format for GUIDs represented as string is a string punctuated by hyphens, for example: 68753A44-4D6F-1226-9C60-0050E4C00067.

- (id) initWithString:(NSString *)aString

Parameters:

  • aString: String representation of the GUID.

stringValue

Returns the string representation of the currently stored GUID value. The string will be formatted according to the common GUID string formatting rule, as described above.

- (NSString *) stringValue