C# Class AcTools.LapTimes.LevelDbUtils.Iterator

An iterator yields a sequence of key/value pairs from a database.
Inheritance: LevelDbHandle
Show file Open project: gro-ove/actools

Public Methods

Method Description
IsValid ( ) : bool

An iterator is either positioned at a key/value pair, or not valid.

Key ( ) : byte[]

Return the key for the current entry. REQUIRES: Valid()

KeyAsInt ( ) : int

Return the key for the current entry. REQUIRES: Valid()

KeyAsString ( ) : string

Return the key for the current entry. REQUIRES: Valid()

Next ( ) : void

Moves to the next entry in the source. After this call, Valid() is true iff the iterator was not positioned at the last entry in the source. REQUIRES: Valid()

Prev ( ) : void

Moves to the previous entry in the source. After this call, Valid() is true iff the iterator was not positioned at the first entry in source. REQUIRES: Valid()

Seek ( byte key ) : void

Position at the first key in the source that at or past target The iterator is Valid() after this call iff the source contains an entry that comes at or past target.

Seek ( int key ) : void

Position at the first key in the source that at or past target The iterator is Valid() after this call iff the source contains an entry that comes at or past target.

Seek ( string key ) : void

Position at the first key in the source that at or past target The iterator is Valid() after this call iff the source contains an entry that comes at or past target.

SeekToFirst ( ) : void

Position at the first key in the source. The iterator is Valid() after this call iff the source is not empty.

SeekToLast ( ) : void

Position at the last key in the source. The iterator is Valid() after this call iff the source is not empty.

Value ( ) : byte[]

Return the value for the current entry. REQUIRES: Valid()

ValueAsInts ( ) : int[]

Return the value for the current entry. REQUIRES: Valid()

ValueAsString ( ) : string

Return the value for the current entry. REQUIRES: Valid()

Protected Methods

Method Description
FreeUnManagedObjects ( ) : void

Private Methods

Method Description
Iterator ( IntPtr handle ) : System
Throw ( ) : void

If an error has occurred, throw it.

Throw ( Exception>.Func exception ) : void

If an error has occurred, throw it.

Method Details

FreeUnManagedObjects() protected method

protected FreeUnManagedObjects ( ) : void
return void

IsValid() public method

An iterator is either positioned at a key/value pair, or not valid.
public IsValid ( ) : bool
return bool

Key() public method

Return the key for the current entry. REQUIRES: Valid()
public Key ( ) : byte[]
return byte[]

KeyAsInt() public method

Return the key for the current entry. REQUIRES: Valid()
public KeyAsInt ( ) : int
return int

KeyAsString() public method

Return the key for the current entry. REQUIRES: Valid()
public KeyAsString ( ) : string
return string

Next() public method

Moves to the next entry in the source. After this call, Valid() is true iff the iterator was not positioned at the last entry in the source. REQUIRES: Valid()
public Next ( ) : void
return void

Prev() public method

Moves to the previous entry in the source. After this call, Valid() is true iff the iterator was not positioned at the first entry in source. REQUIRES: Valid()
public Prev ( ) : void
return void

Seek() public method

Position at the first key in the source that at or past target The iterator is Valid() after this call iff the source contains an entry that comes at or past target.
public Seek ( byte key ) : void
key byte
return void

Seek() public method

Position at the first key in the source that at or past target The iterator is Valid() after this call iff the source contains an entry that comes at or past target.
public Seek ( int key ) : void
key int
return void

Seek() public method

Position at the first key in the source that at or past target The iterator is Valid() after this call iff the source contains an entry that comes at or past target.
public Seek ( string key ) : void
key string
return void

SeekToFirst() public method

Position at the first key in the source. The iterator is Valid() after this call iff the source is not empty.
public SeekToFirst ( ) : void
return void

SeekToLast() public method

Position at the last key in the source. The iterator is Valid() after this call iff the source is not empty.
public SeekToLast ( ) : void
return void

Value() public method

Return the value for the current entry. REQUIRES: Valid()
public Value ( ) : byte[]
return byte[]

ValueAsInts() public method

Return the value for the current entry. REQUIRES: Valid()
public ValueAsInts ( ) : int[]
return int[]

ValueAsString() public method

Return the value for the current entry. REQUIRES: Valid()
public ValueAsString ( ) : string
return string