MCPcopy Create free account
hub / github.com/cutechess/cutechess / initialize

Method initialize

projects/lib/src/econode.cpp:82–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void EcoNode::initialize()
83{
84 static QMutex mutex;
85 if (s_root)
86 return;
87
88 mutex.lock();
89 if (!s_root)
90 {
91 Q_INIT_RESOURCE(eco);
92
93 QFile file(":/eco.bin");
94 if (!file.open(QIODevice::ReadOnly))
95 qWarning("Could not open ECO file");
96 else
97 {
98 QDataStream in(&file);
99 in.setVersion(QDataStream::Qt_4_6);
100 in >> s_openings >> s_root;
101 }
102 }
103 mutex.unlock();
104}
105
106void EcoNode::initialize(PgnStream& in)
107{

Callers

nothing calls this directly

Calls 11

ecoFromStringFunction · 0.85
isOpenMethod · 0.80
movesMethod · 0.80
childMethod · 0.80
valueMethod · 0.80
appendMethod · 0.80
readMethod · 0.45
addChildMethod · 0.45
tagValueMethod · 0.45
isEmptyMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected