Next: WordContext ENVIRONMENT, Previous: WordContext CONFIGURATION, Up: WordContext [Contents][Index]
Constructor. Read the configuration parameters from the
environment. If the environment variable
MIFLUZ_CONFIG
is
set to a pathname, read it as a configuration file. If
MIFLUZ_CONFIG
is not set, try to read the
~/.mifluz
configuration file or
/usr/etc/mifluz.conf
. See the mifluz
manual page for a complete list of the configuration attributes.
Constructor. The config argument must contain all the configuration parameters, no configuration file is loaded from the environment.
Constructor. The array argument holds configuration parameters that will override their equivalent in the configuration file read from the environment.
Initialize the WordContext object. This method is called by every constructor.
When calling Initialize a second time, one must ensure that all WordList and WordCursor objects have been destroyed. WordList and WordCursor internal state depends on the current WordContext that will be lost by a second call.
For those interested by the internals, the Initialize function maintains a Berkeley DB environment (DB_ENV) in the following way:
First invocation:
Initialize -> new DB_ENV (thru WordDBInfo)
Second invocation:
Initialize -> delete DB_ENV -> new DB_ENV (thru WordDBInfo)
Initialize the WordContext object.
Build a
Configuration
object from the file pointed to by the
MIFLUZ_CONFIG environment variable or ~/.mifluz or /usr/etc/mifluz.conf.
The
config_defaults
argument, if provided, is passed to
the
Configuration
object using the
Defaults
method.
The
Initialize(const Configuration &)
method is then called
with the
Configuration
object.
Return OK if success, NOTOK otherwise.
Refer to the
Configuration
description for more information.
Destroy internal state except the
Configuration
object and
rebuild it. May be used when the configuration is changed to
take these changes in account.
Return OK if success, NOTOK otherwise.
Return the WordType data member of the current object as a const.
Return the WordType data member of the current object.
Return the WordKeyInfo data member of the current object as a const.
Return the WordKeyInfo data member of the current object.
Return the WordRecordInfo data member of the current object as a const.
Return the WordRecordInfo data member of the current object.
Return the WordDBInfo data member of the current object as a const.
Return the WordDBInfo data member of the current object.
Return the WordMonitor data member of the current object as a const. The pointer may be NULL if the word_monitor attribute is false.
Return the WordMonitor data member of the current object. The pointer may be NULL if the word_monitor attribute is false.
Return the Configuration data member of the current object as a const.
Return the Configuration data member of the current object.
Return a new WordList object, using the WordList(WordContext*) constructor. It is the responsibility of the caller to delete this object before the WordContext object is deleted. Refer to the wordlist_multi configuration parameter to know the exact type of the object created.
Return a new WordReference object, using the WordReference(WordContext*) constructor. It is the responsibility of the caller to delete this object before the WordContext object is deleted.
Return a new WordReference object, using the WordReference(WordContext*, const String&, const& String) constructor. It is the responsibility of the caller to delete this object before the WordContext object is deleted.
Return a new WordReference object, using the WordReference(WordContext*, const String&) constructor. It is the responsibility of the caller to delete this object before the WordContext object is deleted.
Return a new WordRecord object, using the WordRecord(WordContext*) constructor. It is the responsibility of the caller to delete this object before the WordContext object is deleted.
Return a new WordKey object, using the WordKey(WordContext*) constructor. It is the responsibility of the caller to delete this object before the WordContext object is deleted.
Return a new WordKey object, using the WordKey(WordContext*, const String&) constructor. It is the responsibility of the caller to delete this object before the WordContext object is deleted.
Return a new WordKey object, using the WordKey(WordContext*, const WordKey&) constructor. It is the responsibility of the caller to delete this object before the WordContext object is deleted.
Return the full pathname of the configuration file. The configuration file lookup first searches for the file pointed by the MIFLUZ_CONFIG environment variable then ~/.mifluz and finally /usr/etc/mifluz.conf . If no configuration file is found, return the empty string.
Next: WordContext ENVIRONMENT, Previous: WordContext CONFIGURATION, Up: WordContext [Contents][Index]