VSF Documented
vsf_dynarr.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __VSF_DYNARR_H__
19#define __VSF_DYNARR_H__
20
21/*============================ INCLUDES ======================================*/
24
25#if VSF_USE_DYNARR == ENABLED
26
27#if defined(__VSF_DYNARR_CLASS_IMPLEMENT)
28# define __VSF_CLASS_IMPLEMENT__
29# undef __VSF_DYNARR_CLASS_IMPLEMENT
30#elif defined(__VSF_DYNARR_CLASS_INHERIT__)
31# define __VSF_CLASS_INHERIT__
32# undef __VSF_DYNARR_CLASS_INHERIT__
33#endif
34
35#include "utilities/ooc_class.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/*============================ MACROS ========================================*/
42/*============================ TYPES =========================================*/
43
45
46 public_member(
48 uint8_t item_num_per_buf_bitlen;
49 uint8_t buf_num_per_table_bitlen;
50 )
51
52 private_member(
53 vsf_slist_t table_list;
55 )
56};
57
58/*============================ GLOBAL VARIABLES ==============================*/
59/*============================ PROTOTYPES ====================================*/
60
62extern void vsf_dynarr_fini(vsf_dynarr_t *dynarr);
65extern void * vsf_dynarr_get(vsf_dynarr_t *dynarr, uint_fast32_t pos);
66
67#ifdef __cplusplus
68}
69#endif
70
71#endif // VSF_USE_DYNARR
72#endif // __VSF_DYNARR_H__
vsf_err_t
Definition __type.h:42
Definition vsf_dynarr.h:44
#define vsf_class(__name)
Definition ooc_class.h:48
unsigned short uint16_t
Definition stdint.h:7
unsigned uint32_t
Definition stdint.h:9
unsigned int uint_fast32_t
Definition stdint.h:27
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_list.h:872
void * vsf_dynarr_get(vsf_dynarr_t *dynarr, uint_fast32_t pos)
Definition vsf_dynarr.c:176
uint_fast32_t vsf_dynarr_get_size(vsf_dynarr_t *dynarr)
Definition vsf_dynarr.c:63
void vsf_dynarr_fini(vsf_dynarr_t *dynarr)
Definition vsf_dynarr.c:203
vsf_err_t vsf_dynarr_set_size(vsf_dynarr_t *dynarr, uint_fast32_t size)
Definition vsf_dynarr.c:73
vsf_err_t vsf_dynarr_init(vsf_dynarr_t *dynarr)
Definition vsf_dynarr.c:195
uint32_t size
Definition vsf_memfs.h:50
uint_fast8_t length
Definition vsf_pbuf.c:38
uintptr_t uint_fast32_t item_size
Definition vsf_pool.h:477