MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / net_Spawn

Method net_Spawn

ogsr_engine/xrGame/InfoDocument.cpp:18–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16CInfoDocument::~CInfoDocument(void) {}
17
18BOOL CInfoDocument::net_Spawn(CSE_Abstract* DC)
19{
20 BOOL res = inherited::net_Spawn(DC);
21
22 CSE_Abstract* l_tpAbstract = static_cast<CSE_Abstract*>(DC);
23 CSE_ALifeItemDocument* l_tpALifeItemDocument = smart_cast<CSE_ALifeItemDocument*>(l_tpAbstract);
24 R_ASSERT(l_tpALifeItemDocument);
25
26 m_Info.clear();
27 shared_str m_wDoc = l_tpALifeItemDocument->m_wDoc;
28 if (m_wDoc.size())
29 m_Info.push_back(m_wDoc.c_str());
30
31 CInifile& ini = l_tpAbstract->spawn_ini();
32 if (ini.section_exist("known_info"))
33 {
34 const auto& sect = ini.r_section("known_info");
35 for (const auto& I : sect.Data)
36 {
37 m_Info.push_back(I.first.c_str());
38 }
39 }
40
41 if (pSettings->line_exist(l_tpAbstract->name(), "known_info"))
42 {
43 LPCSTR S = pSettings->r_string(l_tpAbstract->name(), "known_info");
44 if (S && S[0])
45 {
46 string128 info;
47 int count = _GetItemCount(S);
48 for (int it = 0; it < count; ++it)
49 {
50 _GetItem(S, it, info);
51 m_Info.push_back(info);
52 }
53 }
54 }
55
56 return (res);
57}
58
59void CInfoDocument::Load(LPCSTR section) { inherited::Load(section); }
60

Callers

nothing calls this directly

Calls 11

_GetItemCountFunction · 0.85
_GetItemFunction · 0.85
spawn_iniMethod · 0.80
section_existMethod · 0.80
line_existMethod · 0.80
clearMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
c_strMethod · 0.45
nameMethod · 0.45
r_stringMethod · 0.45

Tested by

no test coverage detected