GBProtocolData Class Reference
Inherits from | GBModelBase : NSObject |
Conforms to | GBObjectDataProviding |
Declared in | GBProtocolData.h GBProtocolData.m |
Tasks
Initialization & disposal
-
+ protocolDataWithName:
Returns autoreleased instance of the protocol data with the given name. -
– initWithName:
Initializes the protocol with he given name.
Protocol data
-
nameOfProtocol
The name of the protocol. property -
adoptedProtocols
Protocol's adopted protocols, available viaGBAdoptedProtocolsProvider
. property -
methods
Protocol's methods, available viaGBMethodsProvider
. property
Other Methods
-
– mergeDataFromObject:
Merges all data from the given object. -
– isTopLevelObject
Specifies whether this is a top level object or not.
Properties
adoptedProtocols
Protocol's adopted protocols, available via GBAdoptedProtocolsProvider
.
@property (readonly) GBAdoptedProtocolsProvider *adoptedProtocols
Declared In
GBProtocolData.h
Class Methods
protocolDataWithName:
Returns autoreleased instance of the protocol data with the given name.
+ (id)protocolDataWithName:(NSString *)name
Parameters
- name
- The name of the protocol.
Return Value
Returns initialized object.
Exceptions
- NSException
- Thrown if the given name is
nil
or empty.
Declared In
GBProtocolData.h
Instance Methods
initWithName:
Initializes the protocol with he given name.
- (id)initWithName:(NSString *)name
Parameters
- name
- The name of the protocol.
Return Value
Returns initialized object.
Discussion
This is the designated initializer.
Exceptions
- NSException
- Thrown if the given name is
nil
or empty.
Declared In
GBProtocolData.h
isTopLevelObject
Specifies whether this is a top level object or not.
- (BOOL)isTopLevelObject
Discussion
Top level objects are classes, categories and protocols.
Declared In
GBModelBase.h@95 -> GBProtocolData.m
mergeDataFromObject:
Merges all data from the given object.
- (void)mergeDataFromObject:(id)source
Parameters
- source
- Source object to merge from.
Discussion
Source object is left unchanged. If the same object is passed in, nothing happens. Subclasses should override and add their own specifics, however they should send super object the message as well! Here's overriden method example:
- (void)mergeDataFromObject:(GBModelBase *)source { // source data validation here... [super mergeDataFromObject:source]; // merge custom data here... }
Declared In
GBModelBase.h@71 -> GBProtocolData.m