| 216 | } |
| 217 | |
| 218 | void Namespace::printNamespaceEntries(Namespace * g, bool dumpScript, bool dumpEngine ) |
| 219 | { |
| 220 | static bool inGroup = false; |
| 221 | |
| 222 | // Go through all the entries. |
| 223 | // Iterate through the methods of the namespace... |
| 224 | for(Entry *ewalk = g->mEntryList; ewalk; ewalk = ewalk->mNext) |
| 225 | { |
| 226 | S32 eType = ewalk->mType; |
| 227 | const char * funcName = ewalk->mFunctionName; |
| 228 | |
| 229 | if( ( eType == Entry::ConsoleFunctionType ) && !dumpScript ) |
| 230 | continue; |
| 231 | |
| 232 | if( ( eType != Entry::ConsoleFunctionType ) && !dumpEngine ) |
| 233 | continue; |
| 234 | |
| 235 | // If it's a function |
| 236 | if( eType >= Entry::ConsoleFunctionType ) |
| 237 | { |
| 238 | printClassMethod(true, typeNames[eType], funcName, ewalk->getArgumentsString().c_str(), |
| 239 | ewalk->getDocString().c_str()); |
| 240 | } |
| 241 | else if(ewalk->mType == Entry::GroupMarker) |
| 242 | { |
| 243 | if(!inGroup) |
| 244 | printGroupStart(ewalk->cb.mGroupName, ewalk->mUsage); |
| 245 | else |
| 246 | printGroupEnd(); |
| 247 | |
| 248 | inGroup = !inGroup; |
| 249 | } |
| 250 | else if(ewalk->mType == Entry::ScriptCallbackType) |
| 251 | { |
| 252 | // It's a script callback - emit some sort of appropriate info. |
| 253 | Con::printf(" /*! %s */", ewalk->getDocString().c_str()); |
| 254 | Con::printf(" %s;", ewalk->getPrototypeString().c_str()); |
| 255 | Con::printf(""); |
| 256 | } |
| 257 | else if(ewalk->mFunctionOffset) // If it's a builtin function... |
| 258 | { |
| 259 | String args = ewalk->mCode->getFunctionArgs(ewalk->mFunctionOffset); |
| 260 | printClassMethod(false, typeNames[ewalk->mType], ewalk->mFunctionName, args, ""); |
| 261 | } |
| 262 | else |
| 263 | { |
| 264 | Con::printf(" // got an unknown thing?? %d", ewalk->mType ); |
| 265 | } |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | void Namespace::dumpClasses( bool dumpScript, bool dumpEngine ) |
| 270 | { |
nothing calls this directly
no test coverage detected