GBStoreProviding Protocol Reference

Declared in GBStoreProviding.h

Overview

Defines the requirements for store providers.

Store providers are objects handling the storage of in-memory representations of parsed objects.

Tasks

Registrations handling

Data handling

Helper methods

Instance Methods

categoriesSortedByName

Returns all registered categories sorted by their name.

- (NSArray *)categoriesSortedByName

Discussion

Returns all registered categories sorted by their name.

Declared In

GBStoreProviding.h

categoryWithName:

Returns the category instance that matches the given name.

- (GBCategoryData *)categoryWithName:(NSString *)name

Parameters

name
The name of the category to return.

Return Value

Returns category instance or nil if no match is found.

Discussion

Returns the category instance that matches the given name.

If no registered category matches the given name, nil is returned.

Declared In

GBStoreProviding.h

classWithName:

Returns the class instance that matches the given name.

- (GBClassData *)classWithName:(NSString *)name

Parameters

name
The name of the class to return.

Return Value

Returns class instance or nil if no match is found.

Discussion

Returns the class instance that matches the given name.

If no registered class matches the given name, nil is returned.

Declared In

GBStoreProviding.h

classesSortedByName

Returns all registered classes sorted by their name.

- (NSArray *)classesSortedByName

Discussion

Returns all registered classes sorted by their name.

Declared In

GBStoreProviding.h

protocolWithName:

Returns the protocol instance that matches the given name.

- (GBProtocolData *)protocolWithName:(NSString *)name

Parameters

name
The name of the protocol to return.

Return Value

Returns protocol instance or nil if no match is found.

Discussion

Returns the protocol instance that matches the given name.

If no registered protocol matches the given name, nil is returned.

Declared In

GBStoreProviding.h

protocolsSortedByName

Returns all registered protocols sorted by their name.

- (NSArray *)protocolsSortedByName

Discussion

Returns all registered protocols sorted by their name.

Declared In

GBStoreProviding.h

registerCategory:

Registers the given category to the providers data.

- (void)registerCategory:(GBCategoryData *)category

Parameters

category
The category to register.

Discussion

Registers the given category to the providers data.

If provider doesn't yet have the given category instance registered, the object is added to categories list. If the same object is already registered, nothing happens.

Note: If another instance of the category with the same name/class name is registered, an exception is thrown.

Exceptions

NSException
Thrown if the given category is already registered.

Declared In

GBStoreProviding.h

registerClass:

Registers the given class to the providers data.

- (void)registerClass:(GBClassData *)class

Parameters

class
The class to register.

Discussion

Registers the given class to the providers data.

If provider doesn't yet have the given class instance registered, the object is added to classes list. If the same object is already registered, nothing happens.

Note: If another instance of the class with the same name is registered, an exception is thrown.

Exceptions

NSException
Thrown if the given class is already registered.

Declared In

GBStoreProviding.h

registerProtocol:

Registers the given protocol to the providers data.

- (void)registerProtocol:(GBProtocolData *)protocol

Parameters

protocol
The protocol to register.

Discussion

Registers the given protocol to the providers data.

If provider doesn't yet have the given protocol instance registered, the object is added to protocols list. If the same object is already registered, nothing happens.

Note: If another instance of the protocol with the same name name is registered, an exception is thrown.

Exceptions

NSException
Thrown if the given protocol is already registered.

Declared In

GBStoreProviding.h

Properties

categories

The list of all registered categories and extensions as instances of GBCategoryData .

@property (readonly) NSSet *categories

Discussion

The list of all registered categories and extensions as instances of GBCategoryData .

Declared In

GBStoreProviding.h

classes

The list of all registered classes as instances of GBClassData .

@property (readonly) NSSet *classes

Discussion

The list of all registered classes as instances of GBClassData .

Declared In

GBStoreProviding.h

protocols

The list of all registered protocols as instances of GBProtocolData .

@property (readonly) NSSet *protocols

Discussion

The list of all registered protocols as instances of GBProtocolData .

Declared In

GBStoreProviding.h