GITTreeEntry Class Reference

#import <GITTreeEntry.h>

List of all members.

Public Member Functions

(id) - initWithTreeLine:parent:
(id) - initWithMode:name:sha1:parent:
(id) - initWithModeString:name:sha1:parent:
(NSData *) - raw

Properties

NSString * name
 Name of the entry, either a file or directory name.
NSUInteger mode
 File mode of the entry.
NSString * sha1
 SHA1 of the object referenced.
GITTreeparent
 The tree object this entry belongs to.
GITObjectobject
 The object which is referenced. This is lazy loaded.


Detailed Description

An entry in tree listing.
Todo:
Consider changing from having a GITRepo instance as part of the class to having an instance of the tree which the entry is a part of. We can then defer to the trees repo for object loading. We then need to be very careful about creating memory dependencies which are difficult to manage and may result in memory leakage.

Member Function Documentation

- (id) initWithMode: (NSUInteger)  mode
name: (NSString*)  name
sha1: (NSString*)  hash
parent: (GITTree*)  parent 

Creates and returns a new entry the given settings

Parameters:
mode The file mode of the file or directory described
name The file name of the filr or directory described
hash The SHA1 of the object referenced
parent The parent tree this entry belongs to

- (id) initWithModeString: (NSString*)  mode
name: (NSString*)  name
sha1: (NSString*)  hash
parent: (GITTree*)  parent 

Creates and returns a new entry the given settings

Parameters:
mode The file mode as a string of the file or directory described
name The file name of the filr or directory described
hash The SHA1 of the object referenced
parent The parent tree this entry belongs to

- (id) initWithTreeLine: (NSString*)  line
parent: (GITTree*)  parent 

Creates and returns a new entry by extracting the information tree line.

Parameters:
line The raw line as extracted from a tree object file
parent The parent tree this entry belongs to
Returns:
A new entry

- (NSData *) raw  


Property Documentation

- (NSUInteger) mode [read, assign]

File mode of the entry.

- (NSString *) name [read, copy]

Name of the entry, either a file or directory name.

- (GITObject *) object [read, copy]

The object which is referenced. This is lazy loaded.

- (GITTree *) parent [read, copy]

The tree object this entry belongs to.

- (NSString *) sha1 [read, copy]

SHA1 of the object referenced.


The documentation for this class was generated from the following files:

Generated on Mon Dec 8 22:57:08 2008 for CocoaGit by  doxygen 1.5.7