X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fmain%2Fclasses%2Ffile_directories%2Fbinary%2Findex%2Fclass_IndexFile.php;fp=inc%2Fmain%2Fclasses%2Ffile_directories%2Fbinary%2Findex%2Fclass_IndexFile.php;h=0000000000000000000000000000000000000000;hp=f733589640b774f6c0f0b022365d3dff5ac66589;hb=78a010fef84895720e796842208f01dfb619c332;hpb=7629f2314d517561d4301ddfb068a797b6ed8700 diff --git a/inc/main/classes/file_directories/binary/index/class_IndexFile.php b/inc/main/classes/file_directories/binary/index/class_IndexFile.php deleted file mode 100644 index f7335896..00000000 --- a/inc/main/classes/file_directories/binary/index/class_IndexFile.php +++ /dev/null @@ -1,86 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.ship-simu.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -class IndexFile extends BaseBinaryFile implements Block { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this File class and prepares it for usage - * - * @param $fileName Name of the index file - * @param $blockInstance An instance of a Block class - * @return $fileInstance An instance of this File class - */ - public final static function createIndexFile ($fileName, Block $blockInstance) { - // Get a new instance - $fileInstance = new IndexFile(); - - // Set block instance here for callbacks - $fileInstance->setBlockInstance($blockInstance); - - // Init this abstract file - $fileInstance->initFile($fileName); - - // Return the prepared instance - return $fileInstance; - } - - /** - * Writes given value to the file and returns a hash and gap position for it - * - * @param $groupId Group identifier - * @param $value Value to be added to the stack - * @return $data Hash and gap position - * @throws UnsupportedOperationException If this method is called - */ - public function writeValueToFile ($groupId, $value) { - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',value[' . gettype($value) . ']=' . print_r($value, TRUE)); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); - } - - /** - * Writes given raw data to the file and returns a gap position and length - * - * @param $groupId Group identifier - * @param $hash Hash from encoded value - * @param $encoded Encoded value to be written to the file - * @return $data Gap position and length of the raw data - * @throws UnsupportedOperationException If this method is called - */ - public function writeDataToFreeGap ($groupId, $hash, $encoded) { - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] groupId=' . $groupId . ',encoded()=' . strlen($encoded)); - throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); - } - -}