| Function prototype |
Description |
Cvseq *
Cvcreateseq (INT seq_flags, int header_size, int elem_size, cvmemstorage *
Storage) |
Function: Creates a sequence.
Parameter: seq_flags indicates the sequence symbol. If the sequence is not passed to any function that uses a specific sequence, set it to 0. Otherwise, select an appropriate type from the predefined sequence type.
Header_size is the size of the sequence header. It must be greater than or equal to sizeof (cvseq ). If a type or its extension is specified, this type must be suitable for the header size of the base class.
Elem_size is the size of the element, in bytes. The size must be consistent with the sequence type (specified by seq_flags. For example, for the sequence of a vertex, the element type
Cv_seq_eltype_point should be specified. The elem_size parameter must be equivalent to sizeof (cvpoint ). Storage refers to
Memory |
Cvseq *
Cvcloneseq (const cvseq * seq, cvmemstorage * storage = NULL) |
Function: Creates a copy of a sequence. |
Void
Cvseqinvert (cvseq * SEQ) |
Function: Performs reverse operations on the elements in the sequence. |
Void
Cvseqsort (cvseq * seq, cvcmpfunc func, void * userdata = NULL) |
Function: uses a specific comparison function to sort the elements in a sequence. |
Char *
Cvseqsearch (cvseq * seq, const void * ELEM, cvcmpfunc func, int is_sorted, int
* Elem_idx, void * userdata = NULL) |
Function: query the elements in a sequence. |
Void
Cvclearseq (cvseq * SEQ ); |
Function: clears a sequence. |
Char *
Cvseqpush (cvseq * seq, void * element = NULL) |
Function: add elements to the end of a sequence. |
|
Void cvseqpop (cvseq * seq, void * element = NULL) |
Function: deletes the tail element of a sequence. |
|
Char * cvseqpushfront (cvseq * seq, void * element = NULL) |
Function: adds an element to the sequence header. |
|
Void cvseqpopfront (cvseq * seq, void * element = NULL) |
Function: delete an element in the sequence header. |
|
Void cvseqpushmulti (cvseq * seq, void * elements, int
Count, int in_front = 0 ); |
Function: adds multiple elements to the end or header of a sequence. |
|
Void cvseqpopmulti (cvseq * seq, void * elements, int
Count, int in_front = 0) |
Function: deletes multiple sequence headers or tail elements. |
|
Char * cvseqinsert (cvseq * seq, int before_index, void *
Element = NULL) |
Function: adds an element at a specified position in the sequence. |
|
Void cvseqremove (cvseq * seq, int index) |
Function: deletes an element at a specified position in the sequence. |
|
Char * cvgetseqelem (const cvseq * seq, int index) |
Function: returns the element pointer specified by the index. |
|
Int cvseqelemidx (const cvseq * seq, const void *
Element, cvseqblock ** block = NULL) |
Function: returns the index of the element in the sequence. |
|
Void cvstartappendtoseq (cvseq * seq, cvseqwriter *
Writer) |
Function: writes data to the sequence and initializes the process. |
|
Void cvstartwriteseq (INT seq_flags, int
Header_size, int elem_size, cvmemstorage * storage, cvseqwriter * writer) |
Function: Create a new sequence and initialize the write part. |
|
Cvseq * cvendwriteseq (cvseqwriter * writer) |
Function: completes write operations. |
|
Void cvstartreadseq (const cvseq * seq, cvseqreader *
Reader, int reverse = 0) |
Function: Initialize the reading process in the sequence. |