MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / exportNamespaces

Method exportNamespaces

Engine/source/console/consoleXMLExport.cpp:97–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95 }
96
97 void XMLExport::exportNamespaces()
98 {
99
100 // keep track of which enumTables are in use
101 Vector < const EnumTable*> enumTables;
102
103 mXML->pushNewElement("Namespaces");
104
105 for (Namespace *walk = Namespace::mNamespaceList; walk; walk = walk->mNext)
106 {
107
108 if ( walk->mName && !walk->isClass() )
109 continue;
110
111 const char *name = walk->mName ? walk->mName : "";
112
113 mXML->pushNewElement("Namespace");
114 mXML->setAttribute("name", name);
115
116 Namespace *p = walk->mParent;
117
118 mXML->pushNewElement("Parents");
119
120 while (p)
121 {
122 if (p->mName == walk->mName)
123 {
124 p = p->mParent;
125 continue;
126 }
127
128 const char* pname = p->mName ? p->mName : "";
129
130 mXML->pushNewElement("Parent");
131 mXML->setAttribute("name", pname);
132 mXML->popElement(); // Parent
133
134 p = p->mParent;
135 }
136
137 mXML->popElement(); // Parents
138
139 // Entries (Engine/Script Methods/Functions)
140
141 mXML->pushNewElement("Entries");
142
143 Namespace::Entry *entry;
144 VectorPtr<Namespace::Entry *> vec;
145
146 walk->getEntryList(&vec);
147
148 for( NamespaceEntryListIterator compItr = vec.begin(); compItr != vec.end(); compItr++ )
149 {
150
151 entry = *compItr;
152
153 if (entry->mNamespace != walk)
154 continue;

Callers

nothing calls this directly

Calls 15

dSprintfFunction · 0.85
dTolowerFunction · 0.85
avarFunction · 0.85
dToupperFunction · 0.85
pushNewElementMethod · 0.80
popElementMethod · 0.80
getEntryListMethod · 0.80
getParentClassMethod · 0.80
isClassMethod · 0.45
setAttributeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected