| 4188 | |
| 4189 | |
| 4190 | static void |
| 4191 | icvWriteSeqTree( CvFileStorage* fs, const char* name, |
| 4192 | const void* struct_ptr, CvAttrList attr ) |
| 4193 | { |
| 4194 | const CvSeq* seq = (CvSeq*)struct_ptr; |
| 4195 | const char* recursive_value = cvAttrValue( &attr, "recursive" ); |
| 4196 | int is_recursive = recursive_value && |
| 4197 | strcmp(recursive_value,"0") != 0 && |
| 4198 | strcmp(recursive_value,"false") != 0 && |
| 4199 | strcmp(recursive_value,"False") != 0 && |
| 4200 | strcmp(recursive_value,"FALSE") != 0; |
| 4201 | |
| 4202 | assert( CV_IS_SEQ( seq )); |
| 4203 | |
| 4204 | if( !is_recursive ) |
| 4205 | { |
| 4206 | icvWriteSeq( fs, name, seq, attr, -1 ); |
| 4207 | } |
| 4208 | else |
| 4209 | { |
| 4210 | CvTreeNodeIterator tree_iterator; |
| 4211 | |
| 4212 | cvStartWriteStruct( fs, name, CV_NODE_MAP, CV_TYPE_NAME_SEQ_TREE ); |
| 4213 | cvStartWriteStruct( fs, "sequences", CV_NODE_SEQ ); |
| 4214 | cvInitTreeNodeIterator( &tree_iterator, seq, INT_MAX ); |
| 4215 | |
| 4216 | for(;;) |
| 4217 | { |
| 4218 | if( !tree_iterator.node ) |
| 4219 | break; |
| 4220 | icvWriteSeq( fs, 0, tree_iterator.node, attr, tree_iterator.level ); |
| 4221 | cvNextTreeNode( &tree_iterator ); |
| 4222 | } |
| 4223 | |
| 4224 | cvEndWriteStruct( fs ); |
| 4225 | cvEndWriteStruct( fs ); |
| 4226 | } |
| 4227 | } |
| 4228 | |
| 4229 | |
| 4230 | static void* |
nothing calls this directly
no test coverage detected