GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WordRecord(3) FreeBSD Library Functions Manual WordRecord(3)

WordRecord - inverted index record.

#include <WordRecord.h>
WordContext* context;
WordRecord* record = context->Record();
if(record->DefaultType() == WORD_RECORD_DATA) {
  record->info.data = 120;
} else if(record->DefaultType() == WORD_RECORD_STR) {
  record->info.str = "foobar";
}
delete record;

The record can contain an integer, if the default record type (see CONFIGURATION in WordKeyInfo ) is set to DATA or a string if set to STR. If the type is set to NONE the record does not contain any usable information.

Although constructors may be used, the prefered way to create a WordRecord object is by using the WordContext::Record method.

If default type is DATA it is the decimal representation of an integer. If default type is NONE it is the empty string.

inline WordRecord(WordContext* ncontext)
Constructor. Build an empty record. The ncontext argument must be a pointer to a valid WordContext object.
inline void Clear()
Reset to empty and set the type to the default specified in the configuration.
inline int DefaultType()
Return the default type WORD_RECORD_{DATA,STR,NONE}
inline int Pack(String& packed) const
Convert the object to a representation for disk storage written in the packed string. Return OK on success, NOTOK otherwise.
inline int Unpack(const char* string, int length)

Alias for Unpack(String(string, length))

inline int Unpack(const String& packed)
Read the object from a representation for disk storage contained in the packed argument. Return OK on success, NOTOK otherwise.
int Set(const String& bufferin)
Set the whole structure from ASCII string description stored in the bufferin argument. Return OK on success, NOTOK otherwise.
int Get(String& bufferout) const
Convert the whole structure to an ASCII string description and return it in the bufferout argument. Return OK on success, NOTOK otherwise.
String Get() const
Convert the whole structure to an ASCII string description and return it.
inline WordContext* GetContext()
Return a pointer to the WordContext object used to create this instance.
inline const WordContext* GetContext() const
Return a pointer to the WordContext object used to create this instance as a const.
int Write(FILE* f) const
Print object in ASCII form on descriptor f using the Get method.

Loic Dachary loic@gnu.org

The Ht://Dig group http://dev.htdig.org/

htdb_dump(1), htdb_stat(1), htdb_load(1), mifluzdump(1), mifluzload(1), mifluzsearch(1), mifluzdict(1), WordContext(3), WordList(3), WordDict(3), WordListOne(3), WordKey(3), WordKeyInfo(3), WordType(3), WordDBInfo(3), WordRecordInfo(3), WordReference(3), WordCursor(3), WordCursorOne(3), WordMonitor(3), Configuration(3), mifluz(3)

local

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.