Scid  4.7.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
IndexEntry Class Reference

#include <indexentry.h>

Public Types

enum  {
  IDX_FLAG_START = 0, IDX_FLAG_PROMO = 1, IDX_FLAG_UPROMO = 2, IDX_FLAG_DELETE = 3,
  IDX_FLAG_WHITE_OP = 4, IDX_FLAG_BLACK_OP = 5, IDX_FLAG_MIDDLEGAME = 6, IDX_FLAG_ENDGAME = 7,
  IDX_FLAG_NOVELTY = 8, IDX_FLAG_PAWN = 9, IDX_FLAG_TACTICS = 10, IDX_FLAG_KSIDE = 11,
  IDX_FLAG_QSIDE = 12, IDX_FLAG_BRILLIANCY = 13, IDX_FLAG_BLUNDER = 14, IDX_FLAG_USER = 15,
  IDX_FLAG_CUSTOM1 = 16, IDX_FLAG_CUSTOM2 = 17, IDX_FLAG_CUSTOM3 = 18, IDX_FLAG_CUSTOM4 = 19,
  IDX_FLAG_CUSTOM5 = 20, IDX_FLAG_CUSTOM6 = 21, IDX_NUM_FLAGS = 22
}
 

Public Member Functions

void Init ()
 
template<class T >
errorT Write (T *file, versionT version) const
 
uint64_t GetOffset () const
 
uint32_t GetLength () const
 
idNumberT GetWhite () const
 
eloT GetWhiteElo () const
 
byte GetWhiteRatingType () const
 
idNumberT GetBlack () const
 
eloT GetBlackElo () const
 
byte GetBlackRatingType () const
 
idNumberT GetEvent () const
 
idNumberT GetSite () const
 
idNumberT GetRound () const
 
dateT GetDate () const
 
dateT GetEventDate () const
 
resultT GetResult () const
 
uint GetVariationCount () const
 
uint GetCommentCount () const
 
uint GetNagCount () const
 
uint16_t GetNumHalfMoves () const
 
matSigT GetFinalMatSig () const
 
byte GetStoredLineCode () const
 
ecoT GetEcoCode () const
 
bool GetFlag (uint32_t mask) const
 
const byteGetHomePawnData () const
 
byteGetHomePawnData ()
 
void SetOffset (uint64_t offset)
 
void SetLength (size_t length)
 
void SetWhite (idNumberT id)
 
void SetWhiteElo (eloT elo)
 
void SetWhiteRatingType (byte b)
 
void SetBlack (idNumberT id)
 
void SetBlackElo (eloT elo)
 
void SetBlackRatingType (byte b)
 
void SetEvent (idNumberT id)
 
void SetSite (idNumberT id)
 
void SetRound (idNumberT id)
 
void SetDate (dateT date)
 
void SetEventDate (dateT edate)
 
void SetResult (resultT res)
 
void SetVariationCount (unsigned x)
 
void SetCommentCount (unsigned x)
 
void SetNagCount (unsigned x)
 
void SetRawVariationCount (unsigned x)
 
void SetRawCommentCount (unsigned x)
 
void SetRawNagCount (unsigned x)
 
void SetNumHalfMoves (ushort b)
 
void SetFinalMatSig (matSigT ms)
 
void SetStoredLineCode (byte b)
 
void SetEcoCode (ecoT eco)
 
void SetFlag (uint32_t flagMask, bool set)
 
uint GetYear () const
 
uint GetMonth () const
 
uint GetDay () const
 
void SetPlayer (colorT col, idNumberT id)
 
const char * GetWhiteName (const NameBase *nb) const
 
const char * GetBlackName (const NameBase *nb) const
 
const char * GetEventName (const NameBase *nb) const
 
const char * GetSiteName (const NameBase *nb) const
 
const char * GetRoundName (const NameBase *nb) const
 
eloT GetWhiteElo (const NameBase *nb) const
 
eloT GetBlackElo (const NameBase *nb) const
 
byte GetRating (const NameBase *nb) const
 
bool GetStartFlag () const
 
bool GetPromotionsFlag () const
 
bool GetUnderPromoFlag () const
 
bool GetCommentsFlag () const
 
bool GetVariationsFlag () const
 
bool GetNagsFlag () const
 
bool GetDeleteFlag () const
 
uint GetFlagStr (char *dest, const char *flags) const
 
void SetStartFlag (bool b)
 
void SetPromotionsFlag (bool b)
 
void SetUnderPromoFlag (bool b)
 
void SetDeleteFlag (bool b)
 
void clearFlags ()
 

Static Public Member Functions

static uint CharToFlag (char ch)
 
static uint32_t CharToFlagMask (char flag)
 
static uint32_t StrToFlagMask (const char *flags)
 

Static Public Attributes

static const uint32_t IDX_MASK_ALLFLAGS = 0xFFFFFFFF
 

Detailed Description

Definition at line 54 of file indexentry.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDX_FLAG_START 
IDX_FLAG_PROMO 
IDX_FLAG_UPROMO 
IDX_FLAG_DELETE 
IDX_FLAG_WHITE_OP 
IDX_FLAG_BLACK_OP 
IDX_FLAG_MIDDLEGAME 
IDX_FLAG_ENDGAME 
IDX_FLAG_NOVELTY 
IDX_FLAG_PAWN 
IDX_FLAG_TACTICS 
IDX_FLAG_KSIDE 
IDX_FLAG_QSIDE 
IDX_FLAG_BRILLIANCY 
IDX_FLAG_BLUNDER 
IDX_FLAG_USER 
IDX_FLAG_CUSTOM1 
IDX_FLAG_CUSTOM2 
IDX_FLAG_CUSTOM3 
IDX_FLAG_CUSTOM4 
IDX_FLAG_CUSTOM5 
IDX_FLAG_CUSTOM6 
IDX_NUM_FLAGS 

Definition at line 271 of file indexentry.h.

Member Function Documentation

◆ CharToFlag()

uint IndexEntry::CharToFlag ( char  ch)
inlinestatic

Definition at line 467 of file indexentry.h.

◆ CharToFlagMask()

uint32_t IndexEntry::CharToFlagMask ( char  flag)
inlinestatic

Definition at line 497 of file indexentry.h.

◆ clearFlags()

void IndexEntry::clearFlags ( )
inline

Definition at line 269 of file indexentry.h.

◆ GetBlack()

idNumberT IndexEntry::GetBlack ( ) const
inline

Definition at line 101 of file indexentry.h.

◆ GetBlackElo() [1/2]

eloT IndexEntry::GetBlackElo ( ) const
inline

Definition at line 102 of file indexentry.h.

◆ GetBlackElo() [2/2]

eloT IndexEntry::GetBlackElo ( const NameBase nb) const
inline

Definition at line 245 of file indexentry.h.

◆ GetBlackName()

const char* IndexEntry::GetBlackName ( const NameBase nb) const
inline

Definition at line 228 of file indexentry.h.

◆ GetBlackRatingType()

byte IndexEntry::GetBlackRatingType ( ) const
inline

Definition at line 103 of file indexentry.h.

◆ GetCommentCount()

uint IndexEntry::GetCommentCount ( ) const
inline

Definition at line 111 of file indexentry.h.

◆ GetCommentsFlag()

bool IndexEntry::GetCommentsFlag ( ) const
inline

Definition at line 255 of file indexentry.h.

◆ GetDate()

dateT IndexEntry::GetDate ( ) const
inline

Definition at line 107 of file indexentry.h.

◆ GetDay()

uint IndexEntry::GetDay ( ) const
inline

Definition at line 219 of file indexentry.h.

◆ GetDeleteFlag()

bool IndexEntry::GetDeleteFlag ( ) const
inline

Definition at line 258 of file indexentry.h.

◆ GetEcoCode()

ecoT IndexEntry::GetEcoCode ( ) const
inline

Definition at line 116 of file indexentry.h.

◆ GetEvent()

idNumberT IndexEntry::GetEvent ( ) const
inline

Definition at line 104 of file indexentry.h.

◆ GetEventDate()

dateT IndexEntry::GetEventDate ( ) const
inline

Definition at line 108 of file indexentry.h.

◆ GetEventName()

const char* IndexEntry::GetEventName ( const NameBase nb) const
inline

Definition at line 231 of file indexentry.h.

◆ GetFinalMatSig()

matSigT IndexEntry::GetFinalMatSig ( ) const
inline

Definition at line 114 of file indexentry.h.

◆ GetFlag()

bool IndexEntry::GetFlag ( uint32_t  mask) const
inline

Definition at line 117 of file indexentry.h.

◆ GetFlagStr()

uint IndexEntry::GetFlagStr ( char *  dest,
const char *  flags 
) const
inline

Definition at line 548 of file indexentry.h.

◆ GetHomePawnData() [1/2]

const byte* IndexEntry::GetHomePawnData ( ) const
inline

Definition at line 118 of file indexentry.h.

◆ GetHomePawnData() [2/2]

byte* IndexEntry::GetHomePawnData ( )
inline

Definition at line 119 of file indexentry.h.

◆ GetLength()

uint32_t IndexEntry::GetLength ( ) const
inline

Definition at line 97 of file indexentry.h.

◆ GetMonth()

uint IndexEntry::GetMonth ( ) const
inline

Definition at line 218 of file indexentry.h.

◆ GetNagCount()

uint IndexEntry::GetNagCount ( ) const
inline

Definition at line 112 of file indexentry.h.

◆ GetNagsFlag()

bool IndexEntry::GetNagsFlag ( ) const
inline

Definition at line 257 of file indexentry.h.

◆ GetNumHalfMoves()

uint16_t IndexEntry::GetNumHalfMoves ( ) const
inline

Definition at line 113 of file indexentry.h.

◆ GetOffset()

uint64_t IndexEntry::GetOffset ( ) const
inline

Definition at line 96 of file indexentry.h.

◆ GetPromotionsFlag()

bool IndexEntry::GetPromotionsFlag ( ) const
inline

Definition at line 253 of file indexentry.h.

◆ GetRating()

byte IndexEntry::GetRating ( const NameBase nb) const
inline

Definition at line 431 of file indexentry.h.

◆ GetResult()

resultT IndexEntry::GetResult ( ) const
inline

Definition at line 109 of file indexentry.h.

◆ GetRound()

idNumberT IndexEntry::GetRound ( ) const
inline

Definition at line 106 of file indexentry.h.

◆ GetRoundName()

const char* IndexEntry::GetRoundName ( const NameBase nb) const
inline

Definition at line 237 of file indexentry.h.

◆ GetSite()

idNumberT IndexEntry::GetSite ( ) const
inline

Definition at line 105 of file indexentry.h.

◆ GetSiteName()

const char* IndexEntry::GetSiteName ( const NameBase nb) const
inline

Definition at line 234 of file indexentry.h.

◆ GetStartFlag()

bool IndexEntry::GetStartFlag ( ) const
inline

Definition at line 252 of file indexentry.h.

◆ GetStoredLineCode()

byte IndexEntry::GetStoredLineCode ( ) const
inline

Definition at line 115 of file indexentry.h.

◆ GetUnderPromoFlag()

bool IndexEntry::GetUnderPromoFlag ( ) const
inline

Definition at line 254 of file indexentry.h.

◆ GetVariationCount()

uint IndexEntry::GetVariationCount ( ) const
inline

Definition at line 110 of file indexentry.h.

◆ GetVariationsFlag()

bool IndexEntry::GetVariationsFlag ( ) const
inline

Definition at line 256 of file indexentry.h.

◆ GetWhite()

idNumberT IndexEntry::GetWhite ( ) const
inline

Definition at line 98 of file indexentry.h.

◆ GetWhiteElo() [1/2]

eloT IndexEntry::GetWhiteElo ( ) const
inline

Definition at line 99 of file indexentry.h.

◆ GetWhiteElo() [2/2]

eloT IndexEntry::GetWhiteElo ( const NameBase nb) const
inline

Definition at line 240 of file indexentry.h.

◆ GetWhiteName()

const char* IndexEntry::GetWhiteName ( const NameBase nb) const
inline

Definition at line 225 of file indexentry.h.

◆ GetWhiteRatingType()

byte IndexEntry::GetWhiteRatingType ( ) const
inline

Definition at line 100 of file indexentry.h.

◆ GetYear()

uint IndexEntry::GetYear ( ) const
inline

Definition at line 217 of file indexentry.h.

◆ Init()

void IndexEntry::Init ( )
inline

Definition at line 91 of file indexentry.h.

◆ SetBlack()

void IndexEntry::SetBlack ( idNumberT  id)
inline

Definition at line 142 of file indexentry.h.

◆ SetBlackElo()

void IndexEntry::SetBlackElo ( eloT  elo)
inline

Definition at line 146 of file indexentry.h.

◆ SetBlackRatingType()

void IndexEntry::SetBlackRatingType ( byte  b)
inline

Definition at line 150 of file indexentry.h.

◆ SetCommentCount()

void IndexEntry::SetCommentCount ( unsigned  x)
inline

Definition at line 179 of file indexentry.h.

◆ SetDate()

void IndexEntry::SetDate ( dateT  date)
inline

Definition at line 166 of file indexentry.h.

◆ SetDeleteFlag()

void IndexEntry::SetDeleteFlag ( bool  b)
inline

Definition at line 268 of file indexentry.h.

◆ SetEcoCode()

void IndexEntry::SetEcoCode ( ecoT  eco)
inline

Definition at line 205 of file indexentry.h.

◆ SetEvent()

void IndexEntry::SetEvent ( idNumberT  id)
inline

Definition at line 154 of file indexentry.h.

◆ SetEventDate()

void IndexEntry::SetEventDate ( dateT  edate)
inline

Definition at line 170 of file indexentry.h.

◆ SetFinalMatSig()

void IndexEntry::SetFinalMatSig ( matSigT  ms)
inline

Definition at line 197 of file indexentry.h.

◆ SetFlag()

void IndexEntry::SetFlag ( uint32_t  flagMask,
bool  set 
)
inline

Definition at line 209 of file indexentry.h.

◆ SetLength()

void IndexEntry::SetLength ( size_t  length)
inline

Definition at line 126 of file indexentry.h.

◆ SetNagCount()

void IndexEntry::SetNagCount ( unsigned  x)
inline

Definition at line 180 of file indexentry.h.

◆ SetNumHalfMoves()

void IndexEntry::SetNumHalfMoves ( ushort  b)
inline

Definition at line 193 of file indexentry.h.

◆ SetOffset()

void IndexEntry::SetOffset ( uint64_t  offset)
inline

Definition at line 122 of file indexentry.h.

◆ SetPlayer()

void IndexEntry::SetPlayer ( colorT  col,
idNumberT  id 
)
inline

Definition at line 221 of file indexentry.h.

◆ SetPromotionsFlag()

void IndexEntry::SetPromotionsFlag ( bool  b)
inline

Definition at line 266 of file indexentry.h.

◆ SetRawCommentCount()

void IndexEntry::SetRawCommentCount ( unsigned  x)
inline

Definition at line 185 of file indexentry.h.

◆ SetRawNagCount()

void IndexEntry::SetRawNagCount ( unsigned  x)
inline

Definition at line 189 of file indexentry.h.

◆ SetRawVariationCount()

void IndexEntry::SetRawVariationCount ( unsigned  x)
inline

Definition at line 181 of file indexentry.h.

◆ SetResult()

void IndexEntry::SetResult ( resultT  res)
inline

Definition at line 174 of file indexentry.h.

◆ SetRound()

void IndexEntry::SetRound ( idNumberT  id)
inline

Definition at line 162 of file indexentry.h.

◆ SetSite()

void IndexEntry::SetSite ( idNumberT  id)
inline

Definition at line 158 of file indexentry.h.

◆ SetStartFlag()

void IndexEntry::SetStartFlag ( bool  b)
inline

Definition at line 265 of file indexentry.h.

◆ SetStoredLineCode()

void IndexEntry::SetStoredLineCode ( byte  b)
inline

Definition at line 201 of file indexentry.h.

◆ SetUnderPromoFlag()

void IndexEntry::SetUnderPromoFlag ( bool  b)
inline

Definition at line 267 of file indexentry.h.

◆ SetVariationCount()

void IndexEntry::SetVariationCount ( unsigned  x)
inline

Definition at line 178 of file indexentry.h.

◆ SetWhite()

void IndexEntry::SetWhite ( idNumberT  id)
inline

Definition at line 130 of file indexentry.h.

◆ SetWhiteElo()

void IndexEntry::SetWhiteElo ( eloT  elo)
inline

Definition at line 134 of file indexentry.h.

◆ SetWhiteRatingType()

void IndexEntry::SetWhiteRatingType ( byte  b)
inline

Definition at line 138 of file indexentry.h.

◆ StrToFlagMask()

uint32_t IndexEntry::StrToFlagMask ( const char *  flags)
inlinestatic

Definition at line 531 of file indexentry.h.

◆ Write()

template<class T >
errorT IndexEntry::Write ( T *  file,
versionT  version 
) const

Definition at line 320 of file indexentry.h.

Member Data Documentation

◆ IDX_MASK_ALLFLAGS

const uint32_t IndexEntry::IDX_MASK_ALLFLAGS = 0xFFFFFFFF
static

Definition at line 297 of file indexentry.h.


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