00001 /* Copyright 2009 Andreas Gölzer 00002 00003 This file is part of readESM. 00004 00005 readESM is free software: you can redistribute it and/or modify it under the 00006 terms of the GNU General Public License as published by the Free Software 00007 Foundation, either version 3 of the License, or (at your option) any later 00008 version. 00009 00010 readESM is distributed in the hope that it will be useful, but WITHOUT ANY 00011 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00012 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License along with 00015 readESM. If not, see <http://www.gnu.org/licenses/>. */ 00016 00017 #ifndef READTYPES_H 00018 #define READTYPES_H 00019 00020 #include "DataPointer.h" 00021 00022 #include <QtCore/QString> 00023 00024 QString codepageStringCombination(const DataPointer& start, int length); 00025 QString fixedString(const DataPointer& start, int length); 00026 00027 int readBigEndianInt1(const DataPointer& start); 00028 int readBigEndianInt2(const DataPointer& start); 00029 int readBigEndianInt3(const DataPointer& start); 00030 int readBigEndianInt4(const DataPointer& start); 00031 00032 00033 QString bcdbyte(unsigned char start); 00034 QString hexByte(unsigned char start); 00035 00036 // inline int LEInt32(const DataPointer& start) { 00037 // return (start[3] << 24) + (start[2] << 16) + (start[1] << 8) + start[0]; 00038 // } 00039 00040 #endif