CLucene - a full-featured, c++ search engine
API Documentation


lucene::util::CLStringIntern Class Reference

Functions for intern'ing strings. More...

#include <StringIntern.h>

List of all members.

Static Public Member Functions

static const char * internA (const char *str CL_FILELINEPARAM)
 Internalise the specified string.
static bool uninternA (const char *str)
 Uninternalise the specified string.
static const TCHAR * intern (const TCHAR *str CL_FILELINEPARAM)
 Internalise the specified string.
static bool unintern (const TCHAR *str)
 Uninternalise the specified string.
static void shutdown ()

Detailed Description

Functions for intern'ing strings.

This is a process of pooling strings thus using less memory, and furthermore allows intern'd strings to be directly compared: string1==string2, rather than _tcscmp(string1,string2)


Member Function Documentation

static const TCHAR* lucene::util::CLStringIntern::intern ( const TCHAR *str  CL_FILELINEPARAM  )  [static]

Internalise the specified string.

Returns:
Returns a pointer to the internalised string
static const char* lucene::util::CLStringIntern::internA ( const char *str  CL_FILELINEPARAM  )  [static]

Internalise the specified string.

Returns:
Returns a pointer to the internalised string
static void lucene::util::CLStringIntern::shutdown (  )  [static]
static bool lucene::util::CLStringIntern::unintern ( const TCHAR *  str  )  [static]

Uninternalise the specified string.

Decreases the reference count and frees the string if reference count is zero

Returns:
true if string was destroyed, otherwise false
static bool lucene::util::CLStringIntern::uninternA ( const char *  str  )  [static]

Uninternalise the specified string.

Decreases the reference count and frees the string if reference count is zero

Returns:
true if string was destroyed, otherwise false

The documentation for this class was generated from the following file:

clucene.sourceforge.net