MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / IsVector

Method IsVector

Code/CryEngine/CrySystem/XML/SerializeXMLWriter.cpp:323–353  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

321
322//////////////////////////////////////////////////////////////////////////
323bool CSerializeXMLWriterImpl::IsVector(SmartScriptTable tbl)
324{
325 CHECK_SCRIPT_STACK;
326
327 if (tbl->Count())
328 return false;
329
330 bool have[3] = { false, false, false };
331
332 IScriptTable::Iterator iter = tbl->BeginIteration();
333 while (tbl->MoveNext(iter))
334 {
335 if (iter.sKey)
336 {
337 if (strlen(iter.sKey) > 1)
338 {
339 tbl->EndIteration(iter);
340 return false;
341 }
342 char elem = iter.sKey[0];
343 if (elem < 'x' || elem > 'z')
344 {
345 tbl->EndIteration(iter);
346 return false;
347 }
348 have[elem - 'x'] = true;
349 }
350 }
351 tbl->EndIteration(iter);
352 return have[0] && have[1] && have[2];
353}
354
355//////////////////////////////////////////////////////////////////////////
356const char* CSerializeXMLWriterImpl::GetStackInfo() const

Callers

nothing calls this directly

Calls 5

strlenFunction · 0.85
BeginIterationMethod · 0.80
EndIterationMethod · 0.80
CountMethod · 0.45
MoveNextMethod · 0.45

Tested by

no test coverage detected