A simple dictionary class.
More...
#include <scowl.hpp>
|
| Dictionary (void) |
| Initialize as empty dictionary. More...
|
|
void | init (const char *fn) |
| Perform actual initialization. More...
|
|
int | len (void) const |
| Return maximal length of a word. More...
|
|
int | words (void) const |
| Return total number of words. More...
|
|
int | words (int l) const |
| Return number of words with length l. More...
|
|
const char * | word (int l, int i) const |
| Return word number i with length l. More...
|
|
template<class Char , class Traits > |
std::basic_ostream< Char, Traits > & | print (std::basic_ostream< Char, Traits > &os) const |
| Print statistics summary. More...
|
|
| ~Dictionary (void) |
| Destructor. More...
|
|
A simple dictionary class.
Definition at line 53 of file scowl.hpp.
Dictionary::Dictionary |
( |
void |
| ) |
|
|
inline |
Initialize as empty dictionary.
Definition at line 13478 of file scowl.hpp.
Dictionary::~Dictionary |
( |
void |
| ) |
|
|
inline |
void Dictionary::init |
( |
const char * |
fn | ) |
|
|
inline |
Perform actual initialization.
Reads words from file with name fn. If fn is NULL, the predefined dictionary is used.
Definition at line 13486 of file scowl.hpp.
int Dictionary::len |
( |
void |
| ) |
const |
|
inline |
Return maximal length of a word.
Definition at line 13595 of file scowl.hpp.
int Dictionary::words |
( |
void |
| ) |
const |
|
inline |
Return total number of words.
Definition at line 13599 of file scowl.hpp.
int Dictionary::words |
( |
int |
l | ) |
const |
|
inline |
Return number of words with length l.
Definition at line 13603 of file scowl.hpp.
const char * Dictionary::word |
( |
int |
l, |
|
|
int |
i |
|
) |
| const |
|
inline |
Return word number i with length l.
Definition at line 13607 of file scowl.hpp.
template<class Char , class Traits >
std::basic_ostream< Char, Traits > & Dictionary::print |
( |
std::basic_ostream< Char, Traits > & |
os | ) |
const |
const unsigned int Dictionary::limit_len = 64 |
|
staticprotected |
Maximal word length support.
Definition at line 56 of file scowl.hpp.
unsigned int Dictionary::max_len |
|
protected |
Actual maximal length in dictionary.
Definition at line 58 of file scowl.hpp.
int Dictionary::n_all_words |
|
protected |
Total number of words.
Definition at line 60 of file scowl.hpp.
Number of words of some length.
Definition at line 62 of file scowl.hpp.
Beginning of words of some length.
Definition at line 64 of file scowl.hpp.
One big memory chunk for storing words.
Definition at line 66 of file scowl.hpp.
The documentation for this class was generated from the following file: