interface
| 305 | |
| 306 | // interface |
| 307 | asIScriptFunction *asCObjectType::GetMethodByDecl(const char *decl, bool getVirtual) const |
| 308 | { |
| 309 | if( methods.GetLength() == 0 ) |
| 310 | return 0; |
| 311 | |
| 312 | // Get the module from one of the methods, but it will only be |
| 313 | // used to allow the parsing of types not already known by the object. |
| 314 | // It is possible for object types to be orphaned, e.g. by discarding |
| 315 | // the module that created it. In this case it is still possible to |
| 316 | // find the methods, but any type not known by the object will result in |
| 317 | // an invalid declaration. |
| 318 | asCModule *mod = engine->scriptFunctions[methods[0]]->module; |
| 319 | int id = engine->GetMethodIdByDecl(this, decl, mod); |
| 320 | if( id <= 0 ) |
| 321 | return 0; |
| 322 | |
| 323 | if( !getVirtual ) |
| 324 | { |
| 325 | asCScriptFunction *func = engine->scriptFunctions[id]; |
| 326 | if( func && func->funcType == asFUNC_VIRTUAL ) |
| 327 | return virtualFunctionTable[func->vfTableIdx]; |
| 328 | } |
| 329 | |
| 330 | return engine->scriptFunctions[id]; |
| 331 | } |
| 332 | |
| 333 | // interface |
| 334 | asUINT asCObjectType::GetPropertyCount() const |