source: azure_iot_hub/trunk/azure_iohub/c-utility/inc/azure_c_shared_utility/vector.h@ 388

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

Azure IoT Hub Device C SDK を使ったサンプルの追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr
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#include "azure_c_shared_utility/crt_abstractions.h"
8#include "azure_c_shared_utility/umock_c_prod.h"
9#include "azure_c_shared_utility/vector_types.h"
10
11#ifdef __cplusplus
12#include <cstddef>
13extern "C"
14{
15#else
16#include <stddef.h>
17#include <stdbool.h>
18#endif
19
20/* creation */
21MOCKABLE_FUNCTION(, VECTOR_HANDLE, VECTOR_create, size_t, elementSize);
22MOCKABLE_FUNCTION(, VECTOR_HANDLE, VECTOR_move, VECTOR_HANDLE, handle);
23MOCKABLE_FUNCTION(, void, VECTOR_destroy, VECTOR_HANDLE, handle);
24
25/* insertion */
26MOCKABLE_FUNCTION(, int, VECTOR_push_back, VECTOR_HANDLE, handle, const void*, elements, size_t, numElements);
27
28/* removal */
29MOCKABLE_FUNCTION(, void, VECTOR_erase, VECTOR_HANDLE, handle, void*, elements, size_t, numElements);
30MOCKABLE_FUNCTION(, void, VECTOR_clear, VECTOR_HANDLE, handle);
31
32/* access */
33MOCKABLE_FUNCTION(, void*, VECTOR_element, VECTOR_HANDLE, handle, size_t, index);
34MOCKABLE_FUNCTION(, void*, VECTOR_front, VECTOR_HANDLE, handle);
35MOCKABLE_FUNCTION(, void*, VECTOR_back, VECTOR_HANDLE, handle);
36MOCKABLE_FUNCTION(, void*, VECTOR_find_if, VECTOR_HANDLE, handle, PREDICATE_FUNCTION, pred, const void*, value);
37
38/* capacity */
39MOCKABLE_FUNCTION(, size_t, VECTOR_size, VECTOR_HANDLE, handle);
40
41#ifdef __cplusplus
42}
43#endif
44
45#endif /* VECTOR_H */
Note: See TracBrowser for help on using the repository browser.