Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of azure_c_shared_utility by
vector.h
00001 // Copyright (c) Microsoft. All rights reserved. 00002 // Licensed under the MIT license. See LICENSE file in the project root for full license information. 00003 00004 #ifndef VECTOR_H 00005 #define VECTOR_H 00006 00007 #include "azure_c_shared_utility/crt_abstractions.h" 00008 #include "azure_c_shared_utility/umock_c_prod.h" 00009 00010 #ifdef __cplusplus 00011 #include <cstddef> 00012 #include <cstdbool> 00013 extern "C" 00014 { 00015 #else 00016 #include <stddef.h> 00017 #include <stdbool.h> 00018 #endif 00019 00020 #include "azure_c_shared_utility/vector_types.h" 00021 00022 /* creation */ 00023 MOCKABLE_FUNCTION(, VECTOR_HANDLE, VECTOR_create, size_t, elementSize); 00024 MOCKABLE_FUNCTION(, VECTOR_HANDLE, VECTOR_move, VECTOR_HANDLE, handle); 00025 MOCKABLE_FUNCTION(, void, VECTOR_destroy, VECTOR_HANDLE, handle); 00026 00027 /* insertion */ 00028 MOCKABLE_FUNCTION(, int, VECTOR_push_back, VECTOR_HANDLE, handle, const void*, elements, size_t, numElements); 00029 00030 /* removal */ 00031 MOCKABLE_FUNCTION(, void, VECTOR_erase, VECTOR_HANDLE, handle, void*, elements, size_t, numElements); 00032 MOCKABLE_FUNCTION(, void, VECTOR_clear, VECTOR_HANDLE, handle); 00033 00034 /* access */ 00035 MOCKABLE_FUNCTION(, void*, VECTOR_element, VECTOR_HANDLE, handle, size_t, index); 00036 MOCKABLE_FUNCTION(, void*, VECTOR_front, VECTOR_HANDLE, handle); 00037 MOCKABLE_FUNCTION(, void*, VECTOR_back, VECTOR_HANDLE, handle); 00038 MOCKABLE_FUNCTION(, void*, VECTOR_find_if, VECTOR_HANDLE, handle, PREDICATE_FUNCTION, pred, const void*, value); 00039 00040 /* capacity */ 00041 MOCKABLE_FUNCTION(, size_t, VECTOR_size, VECTOR_HANDLE, handle); 00042 00043 #ifdef __cplusplus 00044 } 00045 #endif 00046 00047 #endif /* VECTOR_H */
Generated on Tue Jul 12 2022 19:14:38 by
