reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
hashset_itr.h
Go to the documentation of this file.
1/*
2 * hashset_itr.h
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 * Modified in 2022 by Edward A. Lee to conform to documentation standards.
17 * Also, changed the logic to iterate using just hashset_iterator_next().
18 */
19
20#ifndef HASHSET_ITR_H_
21#define HASHSET_ITR_H_
22
23#include "hashset.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33
35
50
56
61
68
69#endif /* HASHSET_ITR_H_ */
70
71#ifdef __cplusplus
72}
73#endif
void * hashset_iterator_value(hashset_itr_t itr)
Returns the value at the current index. The called should check hashset_iterator_has_next before call...
Definition hashset_itr.c:78
int hashset_iterator_next(hashset_itr_t itr)
Advance to the next value in the hashset. This returns a non-negative number (the current index) if t...
Definition hashset_itr.c:56
int hashset_iterator_has_next(hashset_itr_t itr)
Return 1 if there is a next value in the hashset and 0 otherwise.
Definition hashset_itr.c:37
hashset_itr_t hashset_iterator(hashset_t set)
Create a hashset iterator. The caller should then iterate over the hashset as follows:
Definition hashset_itr.c:26
struct hashset_itr_st * hashset_itr_t
Definition hashset_itr.h:34
Definition hashset_itr.h:29
int index
Definition hashset_itr.h:31
hashset_t set
Definition hashset_itr.h:30
Definition hashset.h:30