Scid  4.6.5
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
SpellChecker Class Reference

class SpellChecker - name spelling More...

#include <spellchk.h>

Public Member Functions

 ~SpellChecker ()
as a prefix.
std::vector< const char * > find (const nameT &nt, const char *name, uint nMaxRes=10) const
const NameNormalizergetGeneralCorrections (const nameT &nt) const

Static Public Member Functions

static std::pair< errorT, SpellChecker * > Create (const char *filename, const Progress &progress)
 Create() - Create a new SpellChecker object. More...


class SpellChkLoader

is not found or is ambiguous (match multiple players)

SpellChecker::getPlayerInfo() - get extra info about a player

Get extra data like titles/gender, countries, highest elo, date of birth, date of death or biographic informations. Return:

  • on success a pointer to a valid PlayerInfo object containing the available data. If != 0 the vector is filled with the available biographic informations.
  • if returns NULL and is untouched.
const PlayerInfogetPlayerInfo (const char *name, std::vector< const char * > *bio=0) const
const PlayerElogetPlayerElo (const char *name) const
bool hasEloData () const
size_t numCorrectNames (const nameT &nt) const

Detailed Description

class SpellChecker - name spelling

Read a spell file and allow to retrieve corrected names and players data. if SPELLCHKVALIDATE is defined also check the spell file for errors.

Definition at line 257 of file spellchk.h.

Constructor & Destructor Documentation

SpellChecker::~SpellChecker ( )

Definition at line 280 of file spellchk.h.

Member Function Documentation

static std::pair<errorT, SpellChecker*> SpellChecker::Create ( const char *  filename,
const Progress progress 

Create() - Create a new SpellChecker object.

Create a new SpellChecker reading from . It's the caller's responsibility to free the object with "delete". Return:

  • OK and a pointer to the new object
  • on error the ERROR_*CODE* and NULL

Definition at line 293 of file spellchk.h.

std::vector<const char*> SpellChecker::find ( const nameT nt,
const char *  name,
uint  nMaxRes = 10 
) const

Definition at line 316 of file spellchk.h.

const NameNormalizer& SpellChecker::getGeneralCorrections ( const nameT nt) const

Definition at line 332 of file spellchk.h.

const PlayerElo* SpellChecker::getPlayerElo ( const char *  name) const

Definition at line 359 of file spellchk.h.

const PlayerInfo* SpellChecker::getPlayerInfo ( const char *  name,
std::vector< const char * > *  bio = 0 
) const

Definition at line 349 of file spellchk.h.

bool SpellChecker::hasEloData ( ) const

Definition at line 367 of file spellchk.h.

size_t SpellChecker::numCorrectNames ( const nameT nt) const

Definition at line 371 of file spellchk.h.

Friends And Related Function Documentation

friend class SpellChkLoader

Definition at line 277 of file spellchk.h.

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