MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / processArguments

Method processArguments

Engine/source/console/simPersistSet.cpp:50–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48//-----------------------------------------------------------------------------
49
50bool 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

Callers

nothing calls this directly

Calls 5

errorfFunction · 0.70
fromStringMethod · 0.45
getObjectMethod · 0.45
incRefCountMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected