Gather pointers to all the sequences, accessible from the , to the single sequence.
| 3330 | |
| 3331 | // Gather pointers to all the sequences, accessible from the <first>, to the single sequence. |
| 3332 | CV_IMPL CvSeq* |
| 3333 | cvTreeToNodeSeq( const void* first, int header_size, CvMemStorage* storage ) |
| 3334 | { |
| 3335 | CvSeq* allseq = 0; |
| 3336 | CvTreeNodeIterator iterator; |
| 3337 | |
| 3338 | if( !storage ) |
| 3339 | CV_Error( CV_StsNullPtr, "NULL storage pointer" ); |
| 3340 | |
| 3341 | allseq = cvCreateSeq( 0, header_size, sizeof(first), storage ); |
| 3342 | |
| 3343 | if( first ) |
| 3344 | { |
| 3345 | cvInitTreeNodeIterator( &iterator, first, INT_MAX ); |
| 3346 | |
| 3347 | for(;;) |
| 3348 | { |
| 3349 | void* node = cvNextTreeNode( &iterator ); |
| 3350 | if( !node ) |
| 3351 | break; |
| 3352 | cvSeqPush( allseq, &node ); |
| 3353 | } |
| 3354 | } |
| 3355 | |
| 3356 | |
| 3357 | |
| 3358 | return allseq; |
| 3359 | } |
| 3360 | |
| 3361 | |
| 3362 | typedef struct CvTreeNode |
no test coverage detected