source: azure_iot_hub_f767zi/trunk/azure_iot_sdk/c-utility/inc/azure_c_shared_utility/vector.h@ 457

Last change on this file since 457 was 457, checked in by coas-nagasima, 4 years ago

ファイルを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr;charset=UTF-8
File size: 1.4 KB
Line 
1// Copyright (c) Microsoft. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
4#ifndef VECTOR_H
5#define VECTOR_H
6
7#ifdef __cplusplus
8#include <cstddef>
9#else
10#include <stddef.h>
11#include <stdbool.h>
12#endif
13
14#include "azure_c_shared_utility/crt_abstractions.h"
15#include "umock_c/umock_c_prod.h"
16#include "azure_c_shared_utility/vector_types.h"
17
18#ifdef __cplusplus
19extern "C"
20{
21#endif
22
23MOCKABLE_INTERFACE(vector,
24 /* creation */
25 FUNCTION(, VECTOR_HANDLE, VECTOR_create, size_t, elementSize),
26 FUNCTION(, VECTOR_HANDLE, VECTOR_move, VECTOR_HANDLE, handle),
27 FUNCTION(, void, VECTOR_destroy, VECTOR_HANDLE, handle),
28
29 /* insertion */
30 FUNCTION(, int, VECTOR_push_back, VECTOR_HANDLE, handle, const void*, elements, size_t, numElements),
31
32 /* removal */
33 FUNCTION(, void, VECTOR_erase, VECTOR_HANDLE, handle, void*, elements, size_t, numElements),
34 FUNCTION(, void, VECTOR_clear, VECTOR_HANDLE, handle),
35
36 /* access */
37 FUNCTION(, void*, VECTOR_element, VECTOR_HANDLE, handle, size_t, index),
38 FUNCTION(, void*, VECTOR_front, VECTOR_HANDLE, handle),
39 FUNCTION(, void*, VECTOR_back, VECTOR_HANDLE, handle),
40 FUNCTION(, void*, VECTOR_find_if, VECTOR_HANDLE, handle, PREDICATE_FUNCTION, pred, const void*, value),
41
42 /* capacity */
43 FUNCTION(, size_t, VECTOR_size, VECTOR_HANDLE, handle)
44)
45#ifdef __cplusplus
46}
47#endif
48
49#endif /* VECTOR_H */
Note: See TracBrowser for help on using the repository browser.