Line data Source code
1 : /* File: data_full_id_list.inl; Copyright and License: see below */
2 :
3 4 : static inline void data_full_id_list_init ( data_full_id_list_t *this_,
4 : unsigned int max_elements,
5 : data_full_id_t (*elements)[] )
6 : {
7 4 : universal_array_list_init( (universal_array_list_t*) this_,
8 : max_elements,
9 : (void*)elements,
10 : sizeof(data_full_id_t),
11 : sizeof(data_full_id_t),
12 : NULL,
13 : NULL,
14 : NULL
15 : );
16 4 : }
17 :
18 4 : static inline void data_full_id_list_destroy ( data_full_id_list_t *this_ )
19 : {
20 4 : universal_array_list_destroy( (universal_array_list_t*) this_ );
21 4 : }
22 :
23 1 : static inline void data_full_id_list_trace ( const data_full_id_list_t *this_ )
24 : {
25 1 : universal_array_list_trace( (universal_array_list_t*) this_ );
26 2 : for ( unsigned int idx = 0; idx < data_full_id_list_get_length(this_); idx ++ )
27 : {
28 1 : data_full_id_trace( data_full_id_list_get_const(this_,idx) );
29 : }
30 1 : }
31 :
32 1 : static inline bool data_full_id_list_is_empty ( const data_full_id_list_t *this_ )
33 : {
34 1 : return universal_array_list_is_empty( (universal_array_list_t*) this_ );
35 : }
36 :
37 3 : static inline u8_error_t data_full_id_list_add ( data_full_id_list_t *this_, const data_full_id_t* element )
38 : {
39 3 : return universal_array_list_append( (universal_array_list_t*) this_, element );
40 : }
41 :
42 1 : static inline u8_error_t data_full_id_list_add_all ( data_full_id_list_t *this_, const data_full_id_list_t *that )
43 : {
44 1 : return universal_array_list_append_all( (universal_array_list_t*) this_, (const universal_array_list_t*) that );
45 : }
46 :
47 1 : static inline data_full_id_t *data_full_id_list_get_ptr ( data_full_id_list_t *this_, unsigned int index )
48 : {
49 1 : return (data_full_id_t*) universal_array_list_get_ptr( (universal_array_list_t*) this_, index );
50 : }
51 :
52 4 : static inline data_full_id_t const *data_full_id_list_get_const ( const data_full_id_list_t *this_, unsigned int index )
53 : {
54 4 : return (data_full_id_t const*) universal_array_list_get_const( (universal_array_list_t*) this_, index );
55 : }
56 :
57 1 : static inline void data_full_id_list_clear ( data_full_id_list_t *this_ )
58 : {
59 1 : universal_array_list_clear( (universal_array_list_t*) this_ );
60 1 : }
61 :
62 7 : static inline unsigned int data_full_id_list_get_length ( const data_full_id_list_t *this_ )
63 : {
64 7 : return universal_array_list_get_length( (universal_array_list_t*) this_ );
65 : }
66 :
67 :
68 : /*
69 : Copyright 2023-2025 Andreas Warnke
70 :
71 : Licensed under the Apache License, Version 2.0 (the "License");
72 : you may not use this file except in compliance with the License.
73 : You may obtain a copy of the License at
74 :
75 : http://www.apache.org/licenses/LICENSE-2.0
76 :
77 : Unless required by applicable law or agreed to in writing, software
78 : distributed under the License is distributed on an "AS IS" BASIS,
79 : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
80 : See the License for the specific language governing permissions and
81 : limitations under the License.
82 : */
|