the_Foundation 1.0
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
intset.h File Reference
#include "sortedarray.h"

Data Structures

struct  iIntSetReverseIterator
 
struct  iIntSetReverseConstIterator
 

Macros

#define isEmpty_IntSet(d)   isEmpty_SortedArray(d)
 
#define size_IntSet(d)   size_SortedArray(d)
 

Typedefs

typedef iSortedArray iIntSet
 
typedef int(* iIntSetCompareFunc) (const int *, const int *)
 

Functions

iIntSet * new_IntSet (void)
 
void delete_IntSet (iIntSet *)
 
void init_IntSet (iIntSet *)
 
void deinit_IntSet (iIntSet *)
 
void serialize_IntSet (const iIntSet *, iStream *)
 
void deserialize_IntSet (iIntSet *, iStream *)
 
iIntSet * copy_IntSet (const iIntSet *)
 
iIntSet * newCmp_IntSet (iIntSetCompareFunc cmp)
 
void initCmp_IntSet (iIntSet *, iIntSetCompareFunc cmp)
 
iBool contains_IntSet (const iIntSet *, int value)
 
iBool locate_IntSet (const iIntSet *, int value, size_t *pos_out)
 
int at_IntSet (const iIntSet *, size_t pos)
 
iBool insert_IntSet (iIntSet *, int value)
 
iBool remove_IntSet (iIntSet *, int value)
 
Iterators
void init_IntSetIterator (iIntSetIterator *, iIntSet *)
 
void next_IntSetIterator (iIntSetIterator *)
 
void init_IntSetReverseIterator (iIntSetReverseIterator *, iIntSet *)
 
void next_IntSetReverseIterator (iIntSetReverseIterator *)
 
void init_IntSetConstIterator (iIntSetConstIterator *, const iIntSet *)
 
void next_IntSetConstIterator (iIntSetConstIterator *)
 
void init_IntSetReverseConstIterator (iIntSetReverseConstIterator *, const iIntSet *)
 
void next_IntSetReverseConstIterator (iIntSetReverseConstIterator *)
 
void remove_IntSetIterator (iIntSetIterator *)
 

Detailed Description

Set of unique integers.

Authors
Copyright (c) 2020 Jaakko Keränen jaakk.nosp@m.o.ke.nosp@m.ranen.nosp@m.@iki.nosp@m..fi
License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ newCmp_IntSet()

iIntSet * newCmp_IntSet ( iIntSetCompareFunc  cmp)

Constructs an IntSet with a custom comparison function. The default comparison function is used if cmp is NULL.