Module m_readable
Documentation for the modules-m_readable module in /std/modules/m_readable.c.
Functions
-
void set_text(string t)
Set the text for an object to be read. The argument can either be the actual text that will be used or a filename. If it is a filename, either absolute, or relative paths may be used.
-
mixed query_text()
Return the string that is the text that will be read See set_text()
-
int has_entries()
Boolean function which returns 1 if there are entries to be read on the object, otherwise 0. See set_entries()
-
void set_entries(mapping e)
Set the entries for the object. This function takes a mapping as argument. The keys are the names of the entries and the values are either a filename which can be absolute or relative, a function pointer which will be resolved into a text string, or a simple string.
-
void add_entry(mixed name, mixed contents)
Add an additional entry that can be read to the already existing entries. The first argument is the name of the entry and the second is the contents of the entry. See set_entries()
-
void remove_entry(string entry)
Remove a readable entry from the object. The string argument is the name of the entry to be removed. It can be either the name of the entry or one of its synonyms and all synonyms will also be removed. See set_entry()
-
void clear_entries()
Clear all of the entires. Both pages and synonyms.
-
mixed query_entry(string entry)
Query the contents of an entry. The returned value is not evaluated. The string argument can be the actual entry name or a synonym of it.
-
string *list_entries()
A list of all the readable entries on the object
-
mapping dump_entries()
Raw dump of all the entry data.
-
string synonym_index()
Returns a text containing an index of page numbers and synonyms
-
void set_synonyms(mapping s)
Set the synonyms for the readable entries. A mapping is passed as argument. The key is the synonym, and the value is the entry.
-
void set_entry_synonyms(mapping s)
Set the synonyms for the readable entries. A mapping is passed as argument. The key is the synonym, and the value is the entry.
-
void add_synonym(string syn, string entry)
Add an additional synonym The first argument is the synonym and the second argument is the entry to which it refers
-
void remove_synonym(string syn)
Removes a synonym of an entry
-
string query_synonym(string syn)
Return the entry that the synonym refers to
-
mapping dump_synonyms()
Return the mapping of all synonyms
File generated by Lima 1.1a4 reStructured Text daemon.