00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef IXE_LexEntry_H
00026 #define IXE_LexEntry_H
00027
00028
00029 #include "platform.h"
00030
00031 namespace IXE {
00032
00033 #if defined(_WIN32) || defined(__DECCXX) || defined(__GNUC__)
00034
00035 #pragma pack(push, 4)
00036 #endif
00037
00038 struct LexEntry {
00039 off32_t word;
00040 # ifdef LEXLEN
00041
00042 union {
00043 # ifdef WORDS_BIGENDIAN
00044 byte len;
00045 # else
00046 struct {
00047 byte pad[7];
00048 byte len;
00049 };
00050 # endif
00051 off64_t postings;
00052 };
00053 # else
00054 off64_t postings;
00055 # endif
00056
00057 off64_t postingsOffset() const {
00058 # ifdef LEXLEN
00059 return 0xffffffffffffffULL & postings;
00060 # else
00061 return postings;
00062 # endif
00063 }
00064
00065 # ifdef LEXLEN
00066 void set(off32_t word, byte len, off64_t postings) {
00067 this->word = word;
00068 this->postings = postings;
00069 this->len = len;
00070 }
00071 # else
00072 void set(off32_t word, byte len, off64_t postings) {
00073 this->word = word;
00074 this->postings = postings;
00075 }
00076 # endif
00077 };
00078
00079 #if defined(_WIN32) || defined(__DECCXX) || defined(__GNUC__)
00080 #pragma pack(pop)
00081 #endif
00082
00083 }
00084
00085 #endif