| 48 | //----------------------------------------------------------------------------- |
| 49 | |
| 50 | bool SimPersistSet::processArguments( S32 argc, ConsoleValue *argv ) |
| 51 | { |
| 52 | for( U32 i = 0; i < argc; ++ i ) |
| 53 | { |
| 54 | // Parse the UUID. |
| 55 | Torque::UUID uuid; |
| 56 | if( !uuid.fromString( argv[ i ] ) ) |
| 57 | { |
| 58 | Con::errorf( "SimPersistSet::processArguments - could not read UUID at index %i: %s", i, (const char*)argv[ i ] ); |
| 59 | continue; |
| 60 | } |
| 61 | |
| 62 | // Find or create the respective persistent ID. |
| 63 | SimPersistID* pid = SimPersistID::findOrCreate( uuid ); |
| 64 | if( pid->getObject() ) |
| 65 | { |
| 66 | // There's already an object attached to this PID so just |
| 67 | // add the object to the set. |
| 68 | addObject( pid->getObject() ); |
| 69 | } |
| 70 | else |
| 71 | { |
| 72 | // There not yet an object attached to the PID so push it |
| 73 | // onto the stack to resolve it later. |
| 74 | pid->incRefCount(); |
| 75 | mUnresolvedPIDs.push_back( pid ); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | return true; |
| 80 | } |
| 81 | |
| 82 | //----------------------------------------------------------------------------- |
| 83 |
nothing calls this directly
no test coverage detected