C# 클래스 GitSharp.Core.TreeWalk.AbstractTreeIterator

Walks a Git tree (directory) in Git sort order. A new iterator instance should be positioned on the first entry, or at eof. Data for the first entry (if not at eof) should be available immediately. Implementors must walk a tree in the Git sort order, which has the following odd sorting: A.c A/c A0c In the second item, A is the name of a subtree and c is a file within that subtree. The other two items are files in the root level tree.
파일 보기 프로젝트 열기: jagregory/GitSharp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DEFAULT_PATH_SIZE int

보호된 프로퍼티들

프로퍼티 타입 설명
ZeroId byte[]

공개 메소드들

메소드 설명
back ( int delta ) : void

Move to prior entry, populating this iterator with the entry data. The delta indicates how many moves backward should occur. The most common delta is 1 to move to the prior entry. Implementations must populate the following members:

  • Mode
  • {@link #_path} (from {@link #_pathOffset} to {@link #_pathLen})
  • {@link #_pathLen}
as well as any implementation dependent information necessary to accurately return data from idBuffer() and idOffset() when demanded.

createEmptyTreeIterator ( ) : GitSharp.Core.TreeWalk.EmptyTreeIterator
createSubtreeIterator ( Repository repo ) : AbstractTreeIterator
createSubtreeIterator ( Repository repo, MutableObjectId idBuffer, WindowCursor curs ) : AbstractTreeIterator
eof ( ) : bool
first ( ) : bool
getEntryObjectId ( ) : ObjectId

Gets the ObjectId of the current entry.

getEntryObjectId ( MutableObjectId objectId ) : void

Gets the ObjectId of the current entry.

getName ( byte buffer, int offset ) : void

Get the name component of the current entry path into the provided buffer.

growPath ( int len ) : void

Grow the _path buffer larger.

idBuffer ( ) : byte[]

Get the byte array buffer object IDs must be copied out of. The id buffer contains the bytes necessary to construct an ObjectId for the current entry of this iterator. The buffer can be the same buffer for all entries, or it can be a unique buffer per-entry. Implementations are encouraged to expose their private buffer whenever possible to reduce garbage generation and copying costs.

idEqual ( AbstractTreeIterator otherIterator ) : bool

Check if the current entry of both iterators has the same id. This method is faster than getEntryObjectId()as it does not require copying the bytes out of the buffers. A direct idBuffer compare operation is performed.

idOffset ( ) : int
next ( int delta ) : void
pathCompare ( AbstractTreeIterator treeIterator ) : int

Compare the path of this current entry to another iterator's entry.

pathCompare ( AbstractTreeIterator treeIterator, int treeIteratorMode ) : int

Compare the path of this current entry to another iterator's entry.

skip ( ) : void

Advance to the next tree entry, populating this iterator with its data. This method behaves like seek(1) but is called by TreeWalk only if a TreeFilter was used and ruled out the current entry from the results. In such cases this tree iterator may perform special behavior.

stopWalk ( ) : void

Indicates to the iterator that no more entries will be Read. This is only invoked by TreeWalk when the iteration is aborted early due to a StopWalkException being thrown from within a TreeFilter.

보호된 메소드들

메소드 설명
AbstractTreeIterator ( ) : System

Create a new iterator with no parent.

AbstractTreeIterator ( AbstractTreeIterator p ) : System

Create an iterator for a subtree of an existing iterator.

AbstractTreeIterator ( AbstractTreeIterator p, byte childPath, int childPathOffset ) : System

Create an iterator for a subtree of an existing iterator. The caller is responsible for setting up the path of the child iterator.

AbstractTreeIterator ( byte prefix ) : System

Create a new iterator with no parent and a prefix. The prefix path supplied is inserted in front of all paths generated by this iterator. It is intended to be used when an iterator is being created for a subsection of an overall repository and needs to be combined with other iterators that are created to run over the entire repository namespace.

AbstractTreeIterator ( string prefix ) : System

Create a new iterator with no parent and a prefix. The prefix path supplied is inserted in front of all paths generated by this iterator. It is intended to be used when an iterator is being created for a subsection of an overall repository and needs to be combined with other iterators that are created to run over the entire repository namespace.

ensurePathCapacity ( int capacity, int length ) : void

Ensure that path is capable to hold at least capacity bytes.

비공개 메소드들

메소드 설명
AlreadyMatch ( AbstractTreeIterator a, AbstractTreeIterator b ) : int
LastPathChar ( int mode ) : int
SetPathCapacity ( int capacity, int length ) : void

Set path buffer capacity to the specified size

메소드 상세

AbstractTreeIterator() 보호된 메소드

Create a new iterator with no parent.
protected AbstractTreeIterator ( ) : System
리턴 System

AbstractTreeIterator() 보호된 메소드

Create an iterator for a subtree of an existing iterator.
protected AbstractTreeIterator ( AbstractTreeIterator p ) : System
p AbstractTreeIterator parent tree iterator.
리턴 System

AbstractTreeIterator() 보호된 메소드

Create an iterator for a subtree of an existing iterator. The caller is responsible for setting up the path of the child iterator.
protected AbstractTreeIterator ( AbstractTreeIterator p, byte childPath, int childPathOffset ) : System
p AbstractTreeIterator parent tree iterator.
childPath byte /// Path array to be used by the child iterator. This path must /// contain the path from the top of the walk to the first child /// and must end with a '/'. ///
childPathOffset int /// position within childPath where the child can /// insert its data. The value at /// childPath[childPathOffset-1] must be '/'. ///
리턴 System

AbstractTreeIterator() 보호된 메소드

Create a new iterator with no parent and a prefix. The prefix path supplied is inserted in front of all paths generated by this iterator. It is intended to be used when an iterator is being created for a subsection of an overall repository and needs to be combined with other iterators that are created to run over the entire repository namespace.
protected AbstractTreeIterator ( byte prefix ) : System
prefix byte /// position of this iterator in the repository tree. The value /// may be null or the empty array to indicate the prefix is the /// root of the repository. A trailing slash ('/') is /// automatically appended if the prefix does not end in '/'. ///
리턴 System

AbstractTreeIterator() 보호된 메소드

Create a new iterator with no parent and a prefix. The prefix path supplied is inserted in front of all paths generated by this iterator. It is intended to be used when an iterator is being created for a subsection of an overall repository and needs to be combined with other iterators that are created to run over the entire repository namespace.
protected AbstractTreeIterator ( string prefix ) : System
prefix string /// position of this iterator in the repository tree. The value /// may be null or the empty string to indicate the prefix is the /// root of the repository. A trailing slash ('/') is /// automatically appended if the prefix does not end in '/'. ///
리턴 System

back() 공개 추상적인 메소드

Move to prior entry, populating this iterator with the entry data. The delta indicates how many moves backward should occur. The most common delta is 1 to move to the prior entry. Implementations must populate the following members:
  • Mode
  • {@link #_path} (from {@link #_pathOffset} to {@link #_pathLen})
  • {@link #_pathLen}
as well as any implementation dependent information necessary to accurately return data from idBuffer() and idOffset() when demanded.
public abstract back ( int delta ) : void
delta int /// Number of entries to move the iterator by. Must be a positive, /// non-zero integer. ///
리턴 void

createEmptyTreeIterator() 공개 메소드

public createEmptyTreeIterator ( ) : GitSharp.Core.TreeWalk.EmptyTreeIterator
리턴 GitSharp.Core.TreeWalk.EmptyTreeIterator

createSubtreeIterator() 공개 추상적인 메소드

public abstract createSubtreeIterator ( Repository repo ) : AbstractTreeIterator
repo Repository
리턴 AbstractTreeIterator

createSubtreeIterator() 공개 메소드

public createSubtreeIterator ( Repository repo, MutableObjectId idBuffer, WindowCursor curs ) : AbstractTreeIterator
repo Repository
idBuffer MutableObjectId
curs WindowCursor
리턴 AbstractTreeIterator

ensurePathCapacity() 보호된 메소드

Ensure that path is capable to hold at least capacity bytes.
protected ensurePathCapacity ( int capacity, int length ) : void
capacity int the amount of bytes to hold
length int the amount of live bytes in path buffer
리턴 void

eof() 공개 추상적인 메소드

public abstract eof ( ) : bool
리턴 bool

first() 공개 추상적인 메소드

public abstract first ( ) : bool
리턴 bool

getEntryObjectId() 공개 메소드

Gets the ObjectId of the current entry.
public getEntryObjectId ( ) : ObjectId
리턴 ObjectId

getEntryObjectId() 공개 메소드

Gets the ObjectId of the current entry.
public getEntryObjectId ( MutableObjectId objectId ) : void
objectId MutableObjectId buffer to copy the object id into.
리턴 void

getName() 공개 메소드

Get the name component of the current entry path into the provided buffer.
public getName ( byte buffer, int offset ) : void
buffer byte /// The buffer to get the name into, it is assumed that buffer can hold the name. ///
offset int /// The offset of the name in the ///
리턴 void

growPath() 공개 메소드

Grow the _path buffer larger.
public growPath ( int len ) : void
len int /// Number of live bytes in the path buffer. This many bytes will /// be moved into the larger buffer. ///
리턴 void

idBuffer() 공개 추상적인 메소드

Get the byte array buffer object IDs must be copied out of. The id buffer contains the bytes necessary to construct an ObjectId for the current entry of this iterator. The buffer can be the same buffer for all entries, or it can be a unique buffer per-entry. Implementations are encouraged to expose their private buffer whenever possible to reduce garbage generation and copying costs.
public abstract idBuffer ( ) : byte[]
리턴 byte[]

idEqual() 공개 메소드

Check if the current entry of both iterators has the same id. This method is faster than getEntryObjectId()as it does not require copying the bytes out of the buffers. A direct idBuffer compare operation is performed.
public idEqual ( AbstractTreeIterator otherIterator ) : bool
otherIterator AbstractTreeIterator the other iterator to test against.
리턴 bool

idOffset() 공개 추상적인 메소드

public abstract idOffset ( ) : int
리턴 int

next() 공개 추상적인 메소드

public abstract next ( int delta ) : void
delta int
리턴 void

pathCompare() 공개 메소드

Compare the path of this current entry to another iterator's entry.
public pathCompare ( AbstractTreeIterator treeIterator ) : int
treeIterator AbstractTreeIterator /// The other iterator to compare the path against. ///
리턴 int

pathCompare() 공개 메소드

Compare the path of this current entry to another iterator's entry.
public pathCompare ( AbstractTreeIterator treeIterator, int treeIteratorMode ) : int
treeIterator AbstractTreeIterator /// The other iterator to compare the path against. ///
treeIteratorMode int /// The other iterator bits. ///
리턴 int

skip() 공개 메소드

Advance to the next tree entry, populating this iterator with its data. This method behaves like seek(1) but is called by TreeWalk only if a TreeFilter was used and ruled out the current entry from the results. In such cases this tree iterator may perform special behavior.
public skip ( ) : void
리턴 void

stopWalk() 공개 메소드

Indicates to the iterator that no more entries will be Read. This is only invoked by TreeWalk when the iteration is aborted early due to a StopWalkException being thrown from within a TreeFilter.
public stopWalk ( ) : void
리턴 void

프로퍼티 상세

DEFAULT_PATH_SIZE 공개적으로 정적으로 프로퍼티

Default size for the Path buffer.
public static int DEFAULT_PATH_SIZE
리턴 int

ZeroId 보호되어 있는 정적으로 프로퍼티

A dummy ObjectId buffer that matches the zero ObjectId.
protected static byte[] ZeroId
리턴 byte[]