Inherits from NSObject
Declared in OCUDLManager.h

Overview

Manages all user defined literals. User defined literals must be registered to the defaultManager.

Tasks

  • + defaultManager

    Gets the default manager. All registrations should occur on this manager.

  • – registerPrefix:forClass:

    Registers a user defined literal for a prefix. When a literal is found that matches the prefix, the class is constructed and receives the -initWithLiteral:prefix: message.

  • – registerPrefix:forBlock:

    Registers a user defined literal for a prefix. When a literal is found that matches the prefix, the block is executed.

  • – registerSuffix:forClass:

    Registers a user defined literal for a suffix. When a literal is found that matches the suffix, the class is constructed and receives the -initWithLiteral:suffix: message.

  • – registerSuffix:forBlock:

    Registers a user defined literal for a suffix. When a literal is found that matches the suffix, the block is executed.

  • – objectForLiteralString:

    Creates an object from a literal string. If a literal is not found, returns nil.

Class Methods

defaultManager

+ (instancetype)defaultManager
Discussion

Gets the default manager. All registrations should occur on this manager.

Declared In

OCUDLManager.h

Instance Methods

objectForLiteralString:

- (id)objectForLiteralString:(NSString *)str
Discussion

Creates an object from a literal string. If a literal is not found, returns nil.

Parameters

str

The string literal.

Return Value

The created object based on the literal.

Declared In

OCUDLManager.h

registerPrefix:forBlock:

- (void)registerPrefix:(NSString *)prefix forBlock:(OCUDLBlock)block
Discussion

Registers a user defined literal for a prefix. When a literal is found that matches the prefix, the block is executed.

Parameters

prefix

The prefix.

block

The block to execute when a literal is found.

Declared In

OCUDLManager.h

registerPrefix:forClass:

- (void)registerPrefix:(NSString *)prefix forClass:(Class<OCUDLClass>)class
Discussion

Registers a user defined literal for a prefix. When a literal is found that matches the prefix, the class is constructed and receives the -initWithLiteral:prefix: message.

Parameters

prefix

The prefix.

class

The class to construct when a literal is found.

Declared In

OCUDLManager.h

registerSuffix:forBlock:

- (void)registerSuffix:(NSString *)suffix forBlock:(OCUDLBlock)block
Discussion

Registers a user defined literal for a suffix. When a literal is found that matches the suffix, the block is executed.

Parameters

suffix

The suffix.

block

The block to execute when a literal is found.

Declared In

OCUDLManager.h

registerSuffix:forClass:

- (void)registerSuffix:(NSString *)suffix forClass:(Class<OCUDLClass>)class
Discussion

Registers a user defined literal for a suffix. When a literal is found that matches the suffix, the class is constructed and receives the -initWithLiteral:suffix: message.

Parameters

suffix

The suffix.

class

The class to construct when a literal is found.

Declared In

OCUDLManager.h