ETUUID class documentation

Authors

Generated by builder

Contents -

  1. Software documentation for the ETUUID class
  2. Software documentation for the NSString(ETUUID) category
  3. Software documentation for the NSUserDefaults(ETUUID) category

Software documentation for the ETUUID class

ETUUID : NSObject

Declared in:
ETUUID.h
Conforms to:
NSCopying

@group UUID

An implementation of the Universally Unique Identifier standard.

When an ETUUID is instantiated, the underlying UUID is generated with the version 4 (aka random) generation scheme.
Take note the random scheme used on Linux and BSD platforms is based on a strong random number, unlike other platforms where a simpler random scheme is used. Which means collisions can occur on these platforms if you try to generate ETUUID in a tight loop.

You can use -isEqual: to check the equality between two ETUUID instances.

ETUUID does not have a designated initializer.

Method summary

UUID 

+ (id) UUID;

@taskunit Initialization

Returns a new autoreleased UUID object initialized with a random 128-bit binary value.


UUIDWithData: 

+ (ETUUID*) UUIDWithData: (NSData*)aData;

Returns an autoreleased UUID object for the given 16-byte NSData.


UUIDWithString: 

+ (id) UUIDWithString: (NSString*)aString;

Returns an autoreleased UUID object for the given UUID string representation.


UUIDValue 

- (const unsigned char*) UUIDValue;

Returns a 128-bit binary value representation of the receiver.


dataValue 

- (NSData*) dataValue;
Description forthcoming.

init 

- (id) init;

Initializes a UUID object by generating a random 128-bit binary value.


initWithString: 

- (id) initWithString: (NSString*)aString;

Initializes the UUID object from a string representation.


initWithUUID: 

- (id) initWithUUID: (const unsigned char*)aUUID;

Initializes the UUID object with a 128-bit binary value.


stringValue 

- (NSString*) stringValue;

@taskunit Alternative Representations

Returns a string representation of the receiver.


Software documentation for the NSString(ETUUID) category

NSString(ETUUID)

Declared in:
ETUUID.h

@group UUID

UUID related additions to NSString.

Method summary

UUIDString 

+ (NSString*) UUIDString;

Returns an autoreleased UUID string representation (see ETUUID).


Software documentation for the NSUserDefaults(ETUUID) category

NSUserDefaults(ETUUID)

Declared in:
ETUUID.h

@group UUID

Conveniency methods to easily read and write UUIDs in the default database.

Method summary

UUIDForKey: 

- (ETUUID*) UUIDForKey: (NSString*)aKey;

Returns an autoreleased UUID object if the value for aKey is an UUID string representation, otherwise returns nil. Also returns nil if aKey doesn't exist.


setUUID: forKey: 

- (void) setUUID: (ETUUID*)aUUID forKey: (NSString*)aKey;

Sets the value as the string representation of aUUID for aKey.