Added some class fields/attributes.
authorRoland Haeder <roland@mxchange.org>
Thu, 15 May 2014 21:31:41 +0000 (23:31 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 15 May 2014 21:31:41 +0000 (23:31 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
contrib/file_stack/format.txt
inc/classes/main/iterator/io/class_FileIoIterator.php
inc/classes/main/stacker/file_stack/class_BaseFileStack.php

index 03b6165207ab9007c00af39db8c2d2413d197624..2a646c82f49a639a1cd23cf8fa351d51692d3459 100644 (file)
@@ -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:
 
index cfd1297bbf1e920ae603e8611d88eaedc903f79b..1d5469220c6af91229ec0d73c5895f886ab207ec 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 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
         *
index 5ce4b338419e1588c21960a9c184351f8b12a984..565905109ba45c55dcf9210e6c14e8a45199a630 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 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
         *