interface
| 278 | |
| 279 | // interface |
| 280 | asIScriptFunction *asCObjectType::GetMethodByName(const char *in_name, bool in_getVirtual) const |
| 281 | { |
| 282 | int id = -1; |
| 283 | for( asUINT n = 0; n < methods.GetLength(); n++ ) |
| 284 | { |
| 285 | if( engine->scriptFunctions[methods[n]]->name == in_name ) |
| 286 | { |
| 287 | if( id == -1 ) |
| 288 | id = methods[n]; |
| 289 | else |
| 290 | return 0; |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | if( id == -1 ) return 0; |
| 295 | |
| 296 | asCScriptFunction *func = engine->scriptFunctions[id]; |
| 297 | if( !in_getVirtual ) |
| 298 | { |
| 299 | if( func && func->funcType == asFUNC_VIRTUAL ) |
| 300 | return virtualFunctionTable[func->vfTableIdx]; |
| 301 | } |
| 302 | |
| 303 | return func; |
| 304 | } |
| 305 | |
| 306 | // interface |
| 307 | asIScriptFunction *asCObjectType::GetMethodByDecl(const char *decl, bool getVirtual) const |