Scid  4.6.5
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 Read (T *file, versionT version)
 
template<class T >
errorT Write (T *file, versionT version) const
 
uint32_t GetOffset () const
 
void SetOffset (uint32_t offset)
 
uint32_t GetLength () const
 
void SetLength (size_t length)
 
idNumberT GetWhite () const
 
idNumberT GetBlack () const
 
idNumberT GetPlayer (colorT col) const
 
idNumberT GetEvent () const
 
idNumberT GetSite () const
 
idNumberT GetRound () const
 
void SetWhite (idNumberT id)
 
void SetBlack (idNumberT id)
 
void SetPlayer (colorT col, idNumberT id)
 
void SetEvent (idNumberT id)
 
void SetSite (idNumberT id)
 
void SetRound (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
 
errorT SetWhiteName (NameBase *nb, const char *s)
 
errorT SetBlackName (NameBase *nb, const char *s)
 
errorT SetEventName (NameBase *nb, const char *s)
 
errorT SetSiteName (NameBase *nb, const char *s)
 
errorT SetRoundName (NameBase *nb, const char *s)
 
dateT GetDate () const
 
uint GetYear () const
 
uint GetMonth () const
 
uint GetDay () const
 
dateT GetEventDate () const
 
resultT GetResult () const
 
eloT GetWhiteElo () const
 
eloT GetWhiteElo (const NameBase *nb) const
 
eloT GetBlackElo () const
 
eloT GetBlackElo (const NameBase *nb) const
 
eloT GetElo (colorT col) const
 
byte GetWhiteRatingType () const
 
byte GetBlackRatingType () const
 
ecoT GetEcoCode () const
 
ushort GetNumHalfMoves () const
 
byte GetRating (const NameBase *nb) const
 
void SetDate (dateT date)
 
void SetEventDate (dateT edate)
 
void SetResult (resultT res)
 
void SetWhiteElo (eloT elo)
 
void SetBlackElo (eloT elo)
 
void SetWhiteRatingType (byte b)
 
void SetBlackRatingType (byte b)
 
void SetEcoCode (ecoT eco)
 
void SetNumHalfMoves (ushort b)
 
bool GetFlag (uint32_t mask) 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
 
uint GetVariationCount () const
 
uint GetCommentCount () const
 
uint GetNagCount () const
 
matSigT GetFinalMatSig () const
 
byte GetStoredLineCode () const
 
const byteGetHomePawnData () const
 
byteGetHomePawnData ()
 
void SetFlag (uint32_t flagMask, bool b)
 
void SetStartFlag (bool b)
 
void SetPromotionsFlag (bool b)
 
void SetUnderPromoFlag (bool b)
 
void SetDeleteFlag (bool b)
 
void clearFlags ()
 
void SetVariationCount (uint x)
 
void SetCommentCount (uint x)
 
void SetNagCount (uint x)
 
void SetFinalMatSig (matSigT ms)
 
void SetStoredLineCode (byte b)
 

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
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 376 of file indexentry.h.

Member Function Documentation

uint IndexEntry::CharToFlag ( char  ch)
inlinestatic

Definition at line 670 of file indexentry.h.

uint32_t IndexEntry::CharToFlagMask ( char  flag)
inlinestatic

Definition at line 700 of file indexentry.h.

void IndexEntry::clearFlags ( )
inline

Definition at line 357 of file indexentry.h.

idNumberT IndexEntry::GetBlack ( ) const
inline

Definition at line 116 of file indexentry.h.

eloT IndexEntry::GetBlackElo ( ) const
inline

Definition at line 252 of file indexentry.h.

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

Definition at line 253 of file indexentry.h.

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

Definition at line 186 of file indexentry.h.

byte IndexEntry::GetBlackRatingType ( ) const
inline

Definition at line 263 of file indexentry.h.

uint IndexEntry::GetCommentCount ( ) const
inline

Definition at line 326 of file indexentry.h.

bool IndexEntry::GetCommentsFlag ( ) const
inline

Definition at line 315 of file indexentry.h.

dateT IndexEntry::GetDate ( ) const
inline

Definition at line 231 of file indexentry.h.

uint IndexEntry::GetDay ( ) const
inline

Definition at line 234 of file indexentry.h.

bool IndexEntry::GetDeleteFlag ( ) const
inline

Definition at line 318 of file indexentry.h.

ecoT IndexEntry::GetEcoCode ( ) const
inline

Definition at line 264 of file indexentry.h.

eloT IndexEntry::GetElo ( colorT  col) const
inline

Definition at line 258 of file indexentry.h.

idNumberT IndexEntry::GetEvent ( ) const
inline

Definition at line 127 of file indexentry.h.

dateT IndexEntry::GetEventDate ( ) const
inline

Definition at line 235 of file indexentry.h.

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

Definition at line 189 of file indexentry.h.

matSigT IndexEntry::GetFinalMatSig ( ) const
inline

Definition at line 329 of file indexentry.h.

bool IndexEntry::GetFlag ( uint32_t  mask) const
inline

Definition at line 304 of file indexentry.h.

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

Definition at line 751 of file indexentry.h.

const byte* IndexEntry::GetHomePawnData ( ) const
inline

Definition at line 331 of file indexentry.h.

byte* IndexEntry::GetHomePawnData ( )
inline

Definition at line 332 of file indexentry.h.

uint32_t IndexEntry::GetLength ( ) const
inline

Definition at line 89 of file indexentry.h.

uint IndexEntry::GetMonth ( ) const
inline

Definition at line 233 of file indexentry.h.

uint IndexEntry::GetNagCount ( ) const
inline

Definition at line 327 of file indexentry.h.

bool IndexEntry::GetNagsFlag ( ) const
inline

Definition at line 317 of file indexentry.h.

ushort IndexEntry::GetNumHalfMoves ( ) const
inline

Definition at line 265 of file indexentry.h.

uint32_t IndexEntry::GetOffset ( ) const
inline

Definition at line 87 of file indexentry.h.

idNumberT IndexEntry::GetPlayer ( colorT  col) const
inline

Definition at line 123 of file indexentry.h.

bool IndexEntry::GetPromotionsFlag ( ) const
inline

Definition at line 313 of file indexentry.h.

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

Definition at line 634 of file indexentry.h.

resultT IndexEntry::GetResult ( ) const
inline

Definition at line 245 of file indexentry.h.

idNumberT IndexEntry::GetRound ( ) const
inline

Definition at line 141 of file indexentry.h.

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

Definition at line 195 of file indexentry.h.

idNumberT IndexEntry::GetSite ( ) const
inline

Definition at line 134 of file indexentry.h.

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

Definition at line 192 of file indexentry.h.

bool IndexEntry::GetStartFlag ( ) const
inline

Definition at line 312 of file indexentry.h.

byte IndexEntry::GetStoredLineCode ( ) const
inline

Definition at line 330 of file indexentry.h.

bool IndexEntry::GetUnderPromoFlag ( ) const
inline

Definition at line 314 of file indexentry.h.

uint IndexEntry::GetVariationCount ( ) const
inline

Definition at line 325 of file indexentry.h.

bool IndexEntry::GetVariationsFlag ( ) const
inline

Definition at line 316 of file indexentry.h.

idNumberT IndexEntry::GetWhite ( ) const
inline

Definition at line 109 of file indexentry.h.

eloT IndexEntry::GetWhiteElo ( ) const
inline

Definition at line 246 of file indexentry.h.

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

Definition at line 247 of file indexentry.h.

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

Definition at line 183 of file indexentry.h.

byte IndexEntry::GetWhiteRatingType ( ) const
inline

Definition at line 262 of file indexentry.h.

uint IndexEntry::GetYear ( ) const
inline

Definition at line 232 of file indexentry.h.

void IndexEntry::Init ( )
inline

Definition at line 487 of file indexentry.h.

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

Definition at line 522 of file indexentry.h.

void IndexEntry::SetBlack ( idNumberT  id)
inline

Definition at line 154 of file indexentry.h.

void IndexEntry::SetBlackElo ( eloT  elo)
inline

Definition at line 291 of file indexentry.h.

errorT IndexEntry::SetBlackName ( NameBase nb,
const char *  s 
)
inline

Definition at line 205 of file indexentry.h.

void IndexEntry::SetBlackRatingType ( byte  b)
inline

Definition at line 297 of file indexentry.h.

void IndexEntry::SetCommentCount ( uint  x)
inline

Definition at line 362 of file indexentry.h.

void IndexEntry::SetDate ( dateT  date)
inline

Definition at line 268 of file indexentry.h.

void IndexEntry::SetDeleteFlag ( bool  b)
inline

Definition at line 356 of file indexentry.h.

void IndexEntry::SetEcoCode ( ecoT  eco)
inline

Definition at line 300 of file indexentry.h.

void IndexEntry::SetEvent ( idNumberT  id)
inline

Definition at line 163 of file indexentry.h.

void IndexEntry::SetEventDate ( dateT  edate)
inline

Definition at line 271 of file indexentry.h.

errorT IndexEntry::SetEventName ( NameBase nb,
const char *  s 
)
inline

Definition at line 211 of file indexentry.h.

void IndexEntry::SetFinalMatSig ( matSigT  ms)
inline

Definition at line 369 of file indexentry.h.

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

Definition at line 334 of file indexentry.h.

void IndexEntry::SetLength ( size_t  length)
inline

Definition at line 92 of file indexentry.h.

void IndexEntry::SetNagCount ( uint  x)
inline

Definition at line 365 of file indexentry.h.

void IndexEntry::SetNumHalfMoves ( ushort  b)
inline

Definition at line 301 of file indexentry.h.

void IndexEntry::SetOffset ( uint32_t  offset)
inline

Definition at line 88 of file indexentry.h.

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

Definition at line 159 of file indexentry.h.

void IndexEntry::SetPromotionsFlag ( bool  b)
inline

Definition at line 354 of file indexentry.h.

void IndexEntry::SetResult ( resultT  res)
inline

Definition at line 285 of file indexentry.h.

void IndexEntry::SetRound ( idNumberT  id)
inline

Definition at line 175 of file indexentry.h.

errorT IndexEntry::SetRoundName ( NameBase nb,
const char *  s 
)
inline

Definition at line 223 of file indexentry.h.

void IndexEntry::SetSite ( idNumberT  id)
inline

Definition at line 169 of file indexentry.h.

errorT IndexEntry::SetSiteName ( NameBase nb,
const char *  s 
)
inline

Definition at line 217 of file indexentry.h.

void IndexEntry::SetStartFlag ( bool  b)
inline

Definition at line 353 of file indexentry.h.

void IndexEntry::SetStoredLineCode ( byte  b)
inline

Definition at line 372 of file indexentry.h.

void IndexEntry::SetUnderPromoFlag ( bool  b)
inline

Definition at line 355 of file indexentry.h.

void IndexEntry::SetVariationCount ( uint  x)
inline

Definition at line 359 of file indexentry.h.

void IndexEntry::SetWhite ( idNumberT  id)
inline

Definition at line 149 of file indexentry.h.

void IndexEntry::SetWhiteElo ( eloT  elo)
inline

Definition at line 288 of file indexentry.h.

errorT IndexEntry::SetWhiteName ( NameBase nb,
const char *  s 
)
inline

Definition at line 199 of file indexentry.h.

void IndexEntry::SetWhiteRatingType ( byte  b)
inline

Definition at line 294 of file indexentry.h.

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

Definition at line 734 of file indexentry.h.

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

Definition at line 584 of file indexentry.h.

Member Data Documentation

const uint32_t IndexEntry::IDX_MASK_ALLFLAGS = 0xFFFFFFFF
static

Definition at line 402 of file indexentry.h.


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