Scid  4.7.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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...
 

Friends

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 259 of file spellchk.h.

Constructor & Destructor Documentation

◆ ~SpellChecker()

SpellChecker::~SpellChecker ( )
inline

Definition at line 282 of file spellchk.h.

Member Function Documentation

◆ Create()

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

Create() - Create a new SpellChecker object.

Create a new SpellChecker reading from filename. 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 295 of file spellchk.h.

◆ find()

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

Definition at line 318 of file spellchk.h.

◆ getGeneralCorrections()

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

Definition at line 334 of file spellchk.h.

◆ getPlayerElo()

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

Definition at line 361 of file spellchk.h.

◆ getPlayerInfo()

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

Definition at line 351 of file spellchk.h.

◆ hasEloData()

bool SpellChecker::hasEloData ( ) const
inline

Definition at line 369 of file spellchk.h.

◆ numCorrectNames()

size_t SpellChecker::numCorrectNames ( const nameT nt) const
inline

Definition at line 373 of file spellchk.h.

Friends And Related Function Documentation

◆ SpellChkLoader

friend class SpellChkLoader
friend

Definition at line 279 of file spellchk.h.


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