MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / getBlock

Method getBlock

physx/samples/sampleframework/framework/src/ODBlock.cpp:371–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369
370
371ODBlock * ODBlock::getBlock(const char * ident,bool bRecursiveSearch) //returns block with given identifier, or NULL.
372{
373 ODBlock * b;
374 if (identifier && ident && strncmp(identifier,ident,OD_MAXID) == 0)
375 return this;
376 else
377 {
378 if (bTerminal)
379 return NULL;
380 else
381 {
382 ODBlockList::Iterator i;
383 for (i = subBlocks.begin(); i != subBlocks.end(); ++i)
384 if (bRecursiveSearch)
385 {
386 b = (*i)->getBlock(ident,true);
387 if (b)
388 return b;
389 }
390 else
391 {
392 if ((*i)->identifier && ident && strncmp((*i)->identifier,ident,OD_MAXID) == 0)
393 return (*i);
394 }
395 return NULL;
396 }
397 }
398
399}
400
401// hig level macro functs, return true on success:
402bool ODBlock::getBlockInt(const char * ident, int* p, unsigned count) //reads blocks of form: ident{ 123; 123; ... }

Callers 2

SampleInputAssetMethod · 0.80

Calls 3

strncmpFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected