|
AppCore
|
(Internal) Class implements binary search on file More...
#include <EBinarySortedFileSearch.h>
Public Member Functions | |
| EBinarySortedFileSearch () | |
| EBinarySortedFileSearch (const EBinarySortedFileSearch &rhs) | |
| ~EBinarySortedFileSearch () | |
| bool | Init (std::string path, EBinaryRecord *prototype, unsigned short headSize=0) |
| EBinaryRecordCol | Find (std::string key) |
| EBinarySortedFileSearch () | |
| EBinarySortedFileSearch (const EBinarySortedFileSearch &rhs) | |
| ~EBinarySortedFileSearch () | |
| bool | Init (std::string path, EBinaryRecord *prototype, unsigned short headSize=0) |
| EBinaryRecordCol | Find (std::string key) |
(Internal) Class implements binary search on file
File consists of records, which structure is defined by creating class inherited from EBinaryRecord interface. File must be sorted by search key.
| EBinarySortedFileSearch::EBinarySortedFileSearch | ( | ) |
| EBinarySortedFileSearch::EBinarySortedFileSearch | ( | const EBinarySortedFileSearch & | rhs | ) |
| EBinarySortedFileSearch::~EBinarySortedFileSearch | ( | ) |
| EBinarySortedFileSearch::EBinarySortedFileSearch | ( | ) |
| EBinarySortedFileSearch::EBinarySortedFileSearch | ( | const EBinarySortedFileSearch & | rhs | ) |
| EBinarySortedFileSearch::~EBinarySortedFileSearch | ( | ) |
| EBinaryRecordCol EBinarySortedFileSearch::Find | ( | std::string | key | ) |
Searching by key
| key | = search key (key "--all" returns all records from file) |

| EBinaryRecordCol EBinarySortedFileSearch::Find | ( | std::string | key | ) |
Searching by key
| key | = search key (key "--all" returns all records from file) |
| bool EBinarySortedFileSearch::Init | ( | std::string | path, |
| EBinaryRecord * | prototype, | ||
| unsigned short | headSize = 0 |
||
| ) |
Inicialization of search engine
| path | = absolute path of file including its name ( e.g. "/tmp/records.bin" ) |
| prototype | = instance of class inherited from EBinaryRecord which defines the structure of data in file (deleted by EBinarySortedFileSearch) |
| headSize | = size of file header in bytes (0 = file doesn't have any header) |
| bool EBinarySortedFileSearch::Init | ( | std::string | path, |
| EBinaryRecord * | prototype, | ||
| unsigned short | headSize = 0 |
||
| ) |
Inicialization of search engine
| path | = absolute path of file including its name ( e.g. "/tmp/records.bin" ) |
| prototype | = instance of class inherited from EBinaryRecord which defines the structure of data in file (deleted by EBinarySortedFileSearch) |
| headSize | = size of file header in bytes (0 = file doesn't have any header) |
1.8.8