Git.framework Reference Library

GITObject Protocol Reference

GITObject Protocol Reference

Declared in GITObject.h

Overview

Protocol for children of the GITObject class to implement.

The protocol defines the methods which a GITObject child should implement but which are not really appropriate to be defined within the GITObject class itself.

Tasks

Class Methods

typeName

+ (NSString *)typeName
Return Value

string type of the receiver

Discussion

Returns the string type of the receiving GITObject child class.

See Also
Declared In
GITObject.h

type

+ (GITObjectType)type
Return Value

GITObjectType of the receiver

Discussion

Returns the GITObjectType of the receiving GITObject child class.

See Also
Declared In
GITObject.h

Instance Methods

initFromData:sha1:repo:error:

- (id)initFromData:(NSData *)data sha1:(GITObjectHash *)objectHash repo:(GITRepo *)repo error:(NSError **)error
Parameters
data

Data containing the representation of the object to create

objectHash

The SHA1 hash of the receiver

repo

Repository parent of the object

error

NSError describing any errors which occurred

Return Value

Instance of the receiving class

Discussion

Creates and returns an instance of the receiving class.

The data contains the representation of the object to create, the repo specifies the parent repository and where any additional objects associated with the object may be loaded from.

Declared In
GITObject.h

rawContent

- (NSData *)rawContent
Return Value

NSData of the formatted object body

Discussion

Returns the content of the receiver as required for writing to the filesystem or PACK file.

Declared In
GITObject.h

Last updated: 2011-2-20