MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / Debug_Elements

Method Debug_Elements

CrySystem/ScriptObjectScript.cpp:179–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177
178
179void CScriptObjectScript::Debug_Elements( IScriptObject *pCurrent, string &sPath, std::set<const void *> &setVisited )
180{
181 assert(pCurrent);
182
183 pCurrent->BeginIteration();
184
185 while(pCurrent->MoveNext())
186 {
187 char *szKeyName;
188
189 if(!pCurrent->GetCurrentKey(szKeyName))
190 szKeyName="NO";
191
192 ScriptVarType type=pCurrent->GetCurrentType();
193
194 if(type==svtObject) // svtNull,svtFunction,svtString,svtNumber,svtUserData,svtObject
195 {
196 const void *pVis;
197
198 pCurrent->GetCurrentPtr(pVis);
199
200 if(setVisited.count(pVis)!=0)
201 continue;
202
203 setVisited.insert(pVis);
204
205 {
206 IScriptObject *pNewObject = m_pScriptSystem->CreateEmptyObject();
207
208 pCurrent->GetCurrent(pNewObject);
209
210#if defined(LINUX)
211 string s = sPath+string("/")+szKeyName;
212 DWORD dwSubTableCount = Debug_Buckets_recursive(pNewObject,s,setVisited,0xffffffff);
213#else
214 DWORD dwSubTableCount = Debug_Buckets_recursive(pNewObject,sPath+string("/")+szKeyName,setVisited,0xffffffff);
215#endif
216
217 pNewObject->Release();
218
219 GetISystem()->GetILog()->Log(" %8d '%s' '%s'\n",dwSubTableCount,sPath.c_str(),szKeyName);
220 }
221 }
222 }
223
224 pCurrent->EndIteration();
225}
226
227
228

Callers

nothing calls this directly

Calls 15

BeginIterationMethod · 0.80
GetCurrentTypeMethod · 0.80
GetCurrentPtrMethod · 0.80
CreateEmptyObjectMethod · 0.80
GetILogMethod · 0.80
EndIterationMethod · 0.80
GetISystemFunction · 0.70
stringClass · 0.50
MoveNextMethod · 0.45
GetCurrentKeyMethod · 0.45
countMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected