Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

fbBinarySearch_File Class Reference

List of all members.

Detailed Description

Perform a binary search on a file.

The file must already be sorted

Todo:
implement $_load_all parameter

Definition at line 26 of file BinarySearch/File.php.

Public Member Functions

 fbBinarySearch_File ($file=null, $load_all=null, $compare_function=null, $record_length=null)
 getCache ()
 setCache ($cache)
 getCompareFunction ()
 setCompareFunction ($compare_function)
 getFile ()
 setFile ($file)
 getFileSize ()
 getLoadAll ()
 setLoadAll ($load_all)
 getRecordNumber ()
 getReadLength ()
 setReadLength ($read_length)
 getRecordLength ()
 setRecordLength ($record_length)
 search ($search_value)

Private Attributes

 $_cache = false
 $_compare_function = null
 $_compare_object = null
 $_compare_method = null
 $_file = false
 $_file_size = false
 $_load_all = false
 $_record_number = false
 $_read_length = 4096
 $_record_length = null


Constructor & Destructor Documentation

fbBinarySearch_File::fbBinarySearch_File file = null,
load_all = null,
compare_function = null,
record_length = null
 

Constructor

Parameters:
$file string
$load_all bool
$compare_function string
$record_length int

Definition at line 35 of file BinarySearch/File.php.

References setCompareFunction(), setFile(), setLoadAll(), and setReadLength().


Member Function Documentation

fbBinarySearch_File::getCache  ) 
 

Returns:
bool

Definition at line 61 of file BinarySearch/File.php.

fbBinarySearch_File::getCompareFunction  ) 
 

Returns:
string

Definition at line 91 of file BinarySearch/File.php.

fbBinarySearch_File::getFile  ) 
 

Returns:
string

Definition at line 119 of file BinarySearch/File.php.

fbBinarySearch_File::getFileSize  ) 
 

Returns:
int

Definition at line 141 of file BinarySearch/File.php.

fbBinarySearch_File::getLoadAll  ) 
 

Returns:
bool

Definition at line 153 of file BinarySearch/File.php.

fbBinarySearch_File::getReadLength  ) 
 

Returns:
int

Definition at line 185 of file BinarySearch/File.php.

fbBinarySearch_File::getRecordLength  ) 
 

Returns:
int

Definition at line 204 of file BinarySearch/File.php.

fbBinarySearch_File::getRecordNumber  ) 
 

Returns:
int

Definition at line 173 of file BinarySearch/File.php.

fbBinarySearch_File::search search_value  ) 
 

Parameters:
$search_value mixed
Returns:
bool

Definition at line 220 of file BinarySearch/File.php.

fbBinarySearch_File::setCache cache  ) 
 

Parameters:
$cache bool
Returns:
void

Definition at line 69 of file BinarySearch/File.php.

fbBinarySearch_File::setCompareFunction compare_function  ) 
 

Parameters:
$compare_function string
Returns:
void

Definition at line 99 of file BinarySearch/File.php.

References reset().

Referenced by fbBinarySearch_File().

fbBinarySearch_File::setFile file  ) 
 

Parameters:
$file string
Returns:
void

Definition at line 128 of file BinarySearch/File.php.

Referenced by fbBinarySearch_File().

fbBinarySearch_File::setLoadAll load_all  ) 
 

Parameters:
$load_all bool
Returns:
void

Definition at line 161 of file BinarySearch/File.php.

Referenced by fbBinarySearch_File().

fbBinarySearch_File::setReadLength read_length  ) 
 

Parameters:
$read_length int

Definition at line 192 of file BinarySearch/File.php.

Referenced by fbBinarySearch_File().

fbBinarySearch_File::setRecordLength record_length  ) 
 

Parameters:
$record_length int
Returns:
void

Definition at line 212 of file BinarySearch/File.php.


Member Data Documentation

fbBinarySearch_File::$_cache = false [private]
 

Definition at line 56 of file BinarySearch/File.php.

fbBinarySearch_File::$_compare_function = null [private]
 

Definition at line 76 of file BinarySearch/File.php.

fbBinarySearch_File::$_compare_method = null [private]
 

Definition at line 86 of file BinarySearch/File.php.

fbBinarySearch_File::$_compare_object = null [private]
 

Definition at line 81 of file BinarySearch/File.php.

fbBinarySearch_File::$_file = false [private]
 

Definition at line 114 of file BinarySearch/File.php.

fbBinarySearch_File::$_file_size = false [private]
 

Definition at line 136 of file BinarySearch/File.php.

fbBinarySearch_File::$_load_all = false [private]
 

Definition at line 148 of file BinarySearch/File.php.

fbBinarySearch_File::$_read_length = 4096 [private]
 

Definition at line 180 of file BinarySearch/File.php.

fbBinarySearch_File::$_record_length = null [private]
 

Definition at line 199 of file BinarySearch/File.php.

fbBinarySearch_File::$_record_number = false [private]
 

Definition at line 168 of file BinarySearch/File.php.


The documentation for this class was generated from the following file:
Generated on Fri Mar 19 12:52:30 2004 for Freebeer by doxygen 1.3.6-20040222