/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ parcel Lucy; /** Filepointer/statistical data for a Term. * * The TermInfo contains pointer data indicating where information about a * term can be found in various files, plus the document frequency of the * term. * * The lex_filepos member variable is only used if the TermInfo is part of the * .lexx stream; it is a filepointer to a locations in the main .lex file. */ class Lucy::Index::TermInfo cnick TInfo inherits Clownfish::Obj { int32_t doc_freq; int64_t post_filepos; int64_t skip_filepos; int64_t lex_filepos; inert incremented TermInfo* new(int32_t doc_freq = 0); inert TermInfo* init(TermInfo *self, int32_t doc_freq = 0); public int32_t Get_Doc_Freq(TermInfo *self); public int64_t Get_Lex_FilePos(TermInfo *self); public int64_t Get_Post_FilePos(TermInfo *self); public int64_t Get_Skip_FilePos(TermInfo *self); public void Set_Doc_Freq(TermInfo *self, int32_t doc_freq); public void Set_Lex_FilePos(TermInfo *self, int64_t filepos); public void Set_Post_FilePos(TermInfo *self, int64_t filepos); public void Set_Skip_FilePos(TermInfo *self, int64_t filepos); /** "Zero out" the TermInfo. */ void Reset(TermInfo *self); public void Mimic(TermInfo *self, Obj *other); public incremented TermInfo* Clone(TermInfo *self); public incremented CharBuf* To_String(TermInfo *self); }