summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-07-02 14:08:51 -0400
committerDavid Robillard <d@drobilla.net>2021-07-17 19:58:17 -0400
commit157942782c6dc06b12bb72068a9ad605d0938ad8 (patch)
tree01b00cfcd3bcae61b16b726ad478bc28ff665f47 /include
parent458718ce9af374ab2b61f898f298de32c1ec6dd0 (diff)
downloadzix-157942782c6dc06b12bb72068a9ad605d0938ad8.tar.gz
zix-157942782c6dc06b12bb72068a9ad605d0938ad8.tar.bz2
zix-157942782c6dc06b12bb72068a9ad605d0938ad8.zip
Remove ZixSortedArray
Diffstat (limited to 'include')
-rw-r--r--include/zix/sorted_array.h122
1 files changed, 0 insertions, 122 deletions
diff --git a/include/zix/sorted_array.h b/include/zix/sorted_array.h
deleted file mode 100644
index 580551e..0000000
--- a/include/zix/sorted_array.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- Copyright 2011-2020 David Robillard <d@drobilla.net>
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
-#ifndef ZIX_SORTED_ARRAY_H
-#define ZIX_SORTED_ARRAY_H
-
-#include "zix/common.h"
-
-#include <stdbool.h>
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- @addtogroup zix
- @{
- @name SortedArray
- @{
-*/
-
-/// A sorted array
-typedef struct ZixSortedArrayImpl ZixSortedArray;
-
-/// An iterator over a ZixSortedArray
-typedef void* ZixSortedArrayIter;
-
-/// Create a new (empty) sorted array
-ZIX_API
-ZixSortedArray*
-zix_sorted_array_new(bool allow_duplicates,
- ZixComparator cmp,
- void* cmp_data,
- size_t elem_size);
-
-/// Free `a`
-ZIX_API
-void
-zix_sorted_array_free(ZixSortedArray* a);
-
-/// Return the number of elements in `a`
-ZIX_PURE_API
-size_t
-zix_sorted_array_size(const ZixSortedArray* a);
-
-/// Insert the element `e` into `a` and point `ai` at the new element
-ZIX_API
-ZixStatus
-zix_sorted_array_insert(ZixSortedArray* a,
- const void* e,
- ZixSortedArrayIter* ai);
-
-/// Remove the item pointed at by `ai` from `a`
-ZIX_API
-ZixStatus
-zix_sorted_array_remove(ZixSortedArray* a, ZixSortedArrayIter ai);
-
-/**
- Set `ai` to be the largest element <= `e` in `a`.
-
- If no such item exists, `ai` is set to NULL.
-*/
-ZIX_API
-ZixStatus
-zix_sorted_array_find(const ZixSortedArray* a,
- const void* e,
- ZixSortedArrayIter* ai);
-
-/// Return the element at index `index`
-ZIX_PURE_API
-void*
-zix_sorted_array_index(const ZixSortedArray* a, size_t index);
-
-/// Return the data associated with the given array item
-ZIX_CONST_API
-void*
-zix_sorted_array_get_data(ZixSortedArrayIter ai);
-
-/// Return an iterator to the first (smallest) element in `a`
-ZIX_PURE_API
-ZixSortedArrayIter
-zix_sorted_array_begin(ZixSortedArray* a);
-
-/// Return an iterator the the element one past the last element in `a`
-ZIX_PURE_API
-ZixSortedArrayIter
-zix_sorted_array_end(ZixSortedArray* a);
-
-/// Return true iff `a` is an iterator to the end of its tree
-ZIX_PURE_API
-bool
-zix_sorted_array_iter_is_end(ZixSortedArray* a, ZixSortedArrayIter i);
-
-/// Return an iterator that points to the element one past `a`
-ZIX_PURE_API
-ZixSortedArrayIter
-zix_sorted_array_iter_next(ZixSortedArray* a, ZixSortedArrayIter i);
-
-/**
- @}
- @}
-*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* ZIX_SORTED_ARRAY_H */