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

Function cvSeqPush

deps/opencv/modules/core/src/datastructs.cpp:1125–1152  ·  view source on GitHub ↗

Push element onto the sequence: */

Source from the content-addressed store, hash-verified

1123
1124/* Push element onto the sequence: */
1125CV_IMPL schar*
1126cvSeqPush( CvSeq *seq, const void *element )
1127{
1128 schar *ptr = 0;
1129 size_t elem_size;
1130
1131 if( !seq )
1132 CV_Error( CV_StsNullPtr, "" );
1133
1134 elem_size = seq->elem_size;
1135 ptr = seq->ptr;
1136
1137 if( ptr >= seq->block_max )
1138 {
1139 icvGrowSeq( seq, 0 );
1140
1141 ptr = seq->ptr;
1142 assert( ptr + elem_size <= seq->block_max /*&& ptr == seq->block_min */ );
1143 }
1144
1145 if( element )
1146 memcpy( ptr, element, elem_size );
1147 seq->first->prev->count++;
1148 seq->total++;
1149 seq->ptr = ptr + elem_size;
1150
1151 return ptr;
1152}
1153
1154
1155/* Pop last element off of the sequence: */

Callers 15

cvSeqInsertFunction · 0.85
cvNextGraphItemFunction · 0.85
cvTreeToNodeSeqFunction · 0.85
seqPushFunction · 0.85
icvFSCreateCollectionFunction · 0.85
icvYMLParseValueFunction · 0.85
icvYMLParseFunction · 0.85
icvYMLStartWriteStructFunction · 0.85
icvXMLParseValueFunction · 0.85
icvXMLParseFunction · 0.85
icvXMLStartWriteStructFunction · 0.85
icvWriteSparseMatFunction · 0.85

Calls 1

icvGrowSeqFunction · 0.85

Tested by

no test coverage detected