iceberg-cpp
Loading...
Searching...
No Matches
arrow_c_data_guard_internal.h
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#pragma once
21
22#include <nanoarrow/nanoarrow.h>
23
25#include "iceberg/iceberg_export.h"
26
27namespace iceberg::internal {
28
29class ICEBERG_EXPORT ArrowArrayGuard {
30 public:
31 explicit ArrowArrayGuard(ArrowArray* array) : array_(array) {}
33
34 private:
35 ArrowArray* array_;
36};
37
38class ICEBERG_EXPORT ArrowSchemaGuard {
39 public:
40 explicit ArrowSchemaGuard(ArrowSchema* schema) : schema_(schema) {}
42
43 private:
44 ArrowSchema* schema_;
45};
46
47class ICEBERG_EXPORT ArrowArrayViewGuard {
48 public:
49 explicit ArrowArrayViewGuard(ArrowArrayView* view) : view_(view) {}
51
52 private:
53 ArrowArrayView* view_;
54};
55
56class ICEBERG_EXPORT ArrowArrayBufferGuard {
57 public:
58 explicit ArrowArrayBufferGuard(ArrowBuffer* buffer) : buffer_(buffer) {}
60
61 private:
62 ArrowBuffer* buffer_;
63};
64
65} // namespace iceberg::internal
Definition arrow_c_data_guard_internal.h:56
Definition arrow_c_data_guard_internal.h:29
Definition arrow_c_data_guard_internal.h:47
Definition arrow_c_data_guard_internal.h:38
Definition arrow_c_data.h:57
Definition arrow_c_data.h:41