| 393 | } |
| 394 | |
| 395 | asUINT asCObjectType::GetBehaviourCount() const |
| 396 | { |
| 397 | // Count the number of behaviours (except factory functions) |
| 398 | asUINT count = 0; |
| 399 | |
| 400 | if( beh.destruct ) count++; |
| 401 | if( beh.addref ) count++; |
| 402 | if( beh.release ) count++; |
| 403 | if( beh.gcGetRefCount ) count++; |
| 404 | if( beh.gcSetFlag ) count++; |
| 405 | if( beh.gcGetFlag ) count++; |
| 406 | if( beh.gcEnumReferences ) count++; |
| 407 | if( beh.gcReleaseAllReferences ) count++; |
| 408 | if( beh.templateCallback ) count++; |
| 409 | if( beh.listFactory ) count++; |
| 410 | if( beh.getWeakRefFlag ) count++; |
| 411 | |
| 412 | // For reference types, the factories are also stored in the constructor |
| 413 | // list, so it is sufficient to enumerate only those |
| 414 | count += (asUINT)beh.constructors.GetLength(); |
| 415 | |
| 416 | return count; |
| 417 | } |
| 418 | |
| 419 | asIScriptFunction *asCObjectType::GetBehaviourByIndex(asUINT index, asEBehaviours *outBehaviour) const |
| 420 | { |