2
* Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
3
* Redistribution and modifications are permitted subject to BSD license.
5
#ifndef ASN_SEQUENCE_OF_H
6
#define ASN_SEQUENCE_OF_H
8
#include <asn_SET_OF.h>
15
* SEQUENCE OF is the same as SET OF with a tiny difference:
16
* the delete operation preserves the initial order of elements
17
* and thus MAY operate in non-constant time.
19
#define A_SEQUENCE_OF(type) A_SET_OF(type)
21
#define ASN_SEQUENCE_ADD(headptr, ptr) \
22
asn_sequence_add((headptr), (ptr))
24
/***********************************************
25
* Implementation of the SEQUENCE OF structure.
28
#define asn_sequence_add asn_set_add
29
#define asn_sequence_empty asn_set_empty
32
* Delete the element from the set by its number (base 0).
33
* This is NOT a constant-time operation.
34
* The order of elements is preserved.
35
* If _do_free is given AND the (*free) is initialized, the element
36
* will be freed using the custom (*free) function as well.
38
void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free);
41
* Cope with different conversions requirements to/from void in C and C++.
42
* This is mostly useful for support library.
44
typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_;
45
#define _A_SEQUENCE_FROM_VOID(ptr) ((asn_anonymous_sequence_ *)(ptr))
46
#define _A_CSEQUENCE_FROM_VOID(ptr) ((const asn_anonymous_sequence_ *)(ptr))
52
#endif /* ASN_SEQUENCE_OF_H */