MCPcopy Create free account
hub / github.com/creatale/node-dv / icvWriteCollection

Function icvWriteCollection

deps/opencv/modules/core/src/persistence.cpp:3418–3438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3416icvWriteFileNode( CvFileStorage* fs, const char* name, const CvFileNode* node );
3417
3418static void
3419icvWriteCollection( CvFileStorage* fs, const CvFileNode* node )
3420{
3421 int i, total = node->data.seq->total;
3422 int elem_size = node->data.seq->elem_size;
3423 int is_map = CV_NODE_IS_MAP(node->tag);
3424 CvSeqReader reader;
3425
3426 cvStartReadSeq( node->data.seq, &reader, 0 );
3427
3428 for( i = 0; i < total; i++ )
3429 {
3430 CvFileMapNode* elem = (CvFileMapNode*)reader.ptr;
3431 if( !is_map || CV_IS_SET_ELEM(elem) )
3432 {
3433 const char* name = is_map ? elem->key->str.ptr : 0;
3434 icvWriteFileNode( fs, name, &elem->value );
3435 }
3436 CV_NEXT_SEQ_ELEM( elem_size, reader );
3437 }
3438}
3439
3440static void
3441icvWriteFileNode( CvFileStorage* fs, const char* name, const CvFileNode* node )

Callers 2

icvWriteFileNodeFunction · 0.85
cvWriteFileNodeFunction · 0.85

Calls 2

cvStartReadSeqFunction · 0.85
icvWriteFileNodeFunction · 0.85

Tested by

no test coverage detected