From: Roland Haeder Date: Thu, 15 May 2014 21:31:41 +0000 (+0200) Subject: Added some class fields/attributes. X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=bf7bc14731bd4f410f0d54d538f7c9dd35b1a12f;ds=sidebyside Added some class fields/attributes. Signed-off-by: Roland Häder --- diff --git a/contrib/file_stack/format.txt b/contrib/file_stack/format.txt index 03b61652..2a646c82 100644 --- a/contrib/file_stack/format.txt +++ b/contrib/file_stack/format.txt @@ -9,7 +9,7 @@ Purpose: | "magic" | separator | count | position | separator | ---------+-----------+-----------+----------+---------------+-----------+ Bytes: | 9 | 1 | 20 (hex) | 2 - n^2 (hex) | 1 | ---------+-----------+-----------+----------+---------------+-----------+ -Example: | STACKv1.0 | ??? | 00...ff | 01 | ??? | +Example: | STACKv1.0 | 00 | 00...ff | 01 | ff | Continued: diff --git a/inc/classes/main/iterator/io/class_FileIoIterator.php b/inc/classes/main/iterator/io/class_FileIoIterator.php index cfd1297b..1d546922 100644 --- a/inc/classes/main/iterator/io/class_FileIoIterator.php +++ b/inc/classes/main/iterator/io/class_FileIoIterator.php @@ -22,6 +22,16 @@ * along with this program. If not, see . */ class FileIoIterator extends BaseIterator implements SeekableWritableFileIterator { + /** + * Current absolute seek position (returned by key()) + */ + private $seekPosition = -1; + + /** + * Total entries (read from file) + */ + private $totalEntriesFile = -1; + /** * Protected constructor * diff --git a/inc/classes/main/stacker/file_stack/class_BaseFileStack.php b/inc/classes/main/stacker/file_stack/class_BaseFileStack.php index 5ce4b338..56590510 100644 --- a/inc/classes/main/stacker/file_stack/class_BaseFileStack.php +++ b/inc/classes/main/stacker/file_stack/class_BaseFileStack.php @@ -22,6 +22,26 @@ * along with this program. If not, see . */ class BaseFileStack extends BaseStacker { + /** + * Magic for this stack + */ + const STACK_MAGIC = 'STACKv0.1'; + + /** + * Separator magic->count + */ + const SEPARATOR_MAGIC_COUNT = 0x00; + + /** + * Separator position->entries + */ + const SEPARATOR_SEEK_POS_ENTRIES = 0xff; + + /** + * Separator hash->name + */ + const SEPARATOR_HASH_NAME = 0x01; + /** * Protected constructor *