MCPcopy Create free account
hub / github.com/SOUI2/soui / ParseLayoutFile

Function ParseLayoutFile

tools/src/uiresbuilder/residbuilder.cpp:411–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411void ParseLayoutFile(const wchar_t * pszFileName,map<wstring,int> &mapName2ID,int & nStartId)
412{
413 TiXmlDocument xmlLayout;
414 FILE *f = _wfopen(pszFileName,L"rb");
415 if(!f) return;
416
417 if(xmlLayout.LoadFile(f))
418 {
419 TiXmlElement *pXmlNode = xmlLayout.RootElement();
420 //���������skin���
421 if(stricmp(pXmlNode->Value(),"soui") == 0)
422 ParseLayout(pXmlNode->FirstChildElement("root"),mapName2ID,nStartId);
423 else
424 ParseLayout(pXmlNode,mapName2ID,nStartId);
425 }else
426 {
427 wprintf(L"!!!err: Load Layout XML Failed! file name: %s\n",pszFileName);
428 }
429 fclose(f);
430}
431
432//��UIDef���String,Color Table
433__int64 ParseUIDefFile(map<string,string> &mapFiles, const wchar_t * pszFileName,map<string,int> &mapString,map<string,int> &mapColor)

Callers 1

_tmainFunction · 0.85

Calls 5

ParseLayoutFunction · 0.85
RootElementMethod · 0.80
LoadFileMethod · 0.45
ValueMethod · 0.45
FirstChildElementMethod · 0.45

Tested by

no test coverage detected