Repository: arrow Updated Branches: refs/heads/master 3f9b26c0e -> 7c1fef51c
http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/int64-array.h ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/int64-array.h b/c_glib/arrow-glib/int64-array.h deleted file mode 100644 index 73d4c64..0000000 --- a/c_glib/arrow-glib/int64-array.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include <arrow-glib/array.h> - -G_BEGIN_DECLS - -#define GARROW_TYPE_INT64_ARRAY \ - (garrow_int64_array_get_type()) -#define GARROW_INT64_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - GARROW_TYPE_INT64_ARRAY, \ - GArrowInt64Array)) -#define GARROW_INT64_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), \ - GARROW_TYPE_INT64_ARRAY, \ - GArrowInt64ArrayClass)) -#define GARROW_IS_INT64_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - GARROW_TYPE_INT64_ARRAY)) -#define GARROW_IS_INT64_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), \ - GARROW_TYPE_INT64_ARRAY)) -#define GARROW_INT64_ARRAY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), \ - GARROW_TYPE_INT64_ARRAY, \ - GArrowInt64ArrayClass)) - -typedef struct _GArrowInt64Array GArrowInt64Array; -typedef struct _GArrowInt64ArrayClass GArrowInt64ArrayClass; - -/** - * GArrowInt64Array: - * - * It wraps `arrow::Int64Array`. - */ -struct _GArrowInt64Array -{ - /*< private >*/ - GArrowArray parent_instance; -}; - -struct _GArrowInt64ArrayClass -{ - GArrowArrayClass parent_class; -}; - -GType garrow_int64_array_get_type(void) G_GNUC_CONST; - -gint64 garrow_int64_array_get_value(GArrowInt64Array *array, - gint64 i); - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/int8-array.cpp ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/int8-array.cpp b/c_glib/arrow-glib/int8-array.cpp deleted file mode 100644 index d3f12ec..0000000 --- a/c_glib/arrow-glib/int8-array.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <arrow-glib/array.hpp> -#include <arrow-glib/int8-array.h> - -G_BEGIN_DECLS - -/** - * SECTION: int8-array - * @short_description: 8-bit integer array class - * - * #GArrowInt8Array is a class for 8-bit integer array. It can store - * zero or more 8-bit integer data. - * - * #GArrowInt8Array is immutable. You need to use - * #GArrowInt8ArrayBuilder to create a new array. - */ - -G_DEFINE_TYPE(GArrowInt8Array, \ - garrow_int8_array, \ - GARROW_TYPE_ARRAY) - -static void -garrow_int8_array_init(GArrowInt8Array *object) -{ -} - -static void -garrow_int8_array_class_init(GArrowInt8ArrayClass *klass) -{ -} - -/** - * garrow_int8_array_get_value: - * @array: A #GArrowInt8Array. - * @i: The index of the target value. - * - * Returns: The i-th value. - */ -gint8 -garrow_int8_array_get_value(GArrowInt8Array *array, - gint64 i) -{ - auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array)); - return static_cast<arrow::Int8Array *>(arrow_array.get())->Value(i); -} - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/int8-array.h ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/int8-array.h b/c_glib/arrow-glib/int8-array.h deleted file mode 100644 index 0e1e901..0000000 --- a/c_glib/arrow-glib/int8-array.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include <arrow-glib/array.h> - -G_BEGIN_DECLS - -#define GARROW_TYPE_INT8_ARRAY \ - (garrow_int8_array_get_type()) -#define GARROW_INT8_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - GARROW_TYPE_INT8_ARRAY, \ - GArrowInt8Array)) -#define GARROW_INT8_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), \ - GARROW_TYPE_INT8_ARRAY, \ - GArrowInt8ArrayClass)) -#define GARROW_IS_INT8_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - GARROW_TYPE_INT8_ARRAY)) -#define GARROW_IS_INT8_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), \ - GARROW_TYPE_INT8_ARRAY)) -#define GARROW_INT8_ARRAY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), \ - GARROW_TYPE_INT8_ARRAY, \ - GArrowInt8ArrayClass)) - -typedef struct _GArrowInt8Array GArrowInt8Array; -typedef struct _GArrowInt8ArrayClass GArrowInt8ArrayClass; - -/** - * GArrowInt8Array: - * - * It wraps `arrow::Int8Array`. - */ -struct _GArrowInt8Array -{ - /*< private >*/ - GArrowArray parent_instance; -}; - -struct _GArrowInt8ArrayClass -{ - GArrowArrayClass parent_class; -}; - -GType garrow_int8_array_get_type(void) G_GNUC_CONST; - -gint8 garrow_int8_array_get_value(GArrowInt8Array *array, - gint64 i); - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/list-array.cpp ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/list-array.cpp b/c_glib/arrow-glib/list-array.cpp deleted file mode 100644 index 2b3fb31..0000000 --- a/c_glib/arrow-glib/list-array.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <arrow-glib/array.hpp> -#include <arrow-glib/data-type.hpp> -#include <arrow-glib/list-array.h> - -G_BEGIN_DECLS - -/** - * SECTION: list-array - * @short_description: List array class - * @include: arrow-glib/arrow-glib.h - * - * #GArrowListArray is a class for list array. It can store zero - * or more list data. - * - * #GArrowListArray is immutable. You need to use - * #GArrowListArrayBuilder to create a new array. - */ - -G_DEFINE_TYPE(GArrowListArray, \ - garrow_list_array, \ - GARROW_TYPE_ARRAY) - -static void -garrow_list_array_init(GArrowListArray *object) -{ -} - -static void -garrow_list_array_class_init(GArrowListArrayClass *klass) -{ -} - -/** - * garrow_list_array_get_value_type: - * @array: A #GArrowListArray. - * - * Returns: (transfer full): The data type of value in each list. - */ -GArrowDataType * -garrow_list_array_get_value_type(GArrowListArray *array) -{ - auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array)); - auto arrow_list_array = - static_cast<arrow::ListArray *>(arrow_array.get()); - auto arrow_value_type = arrow_list_array->value_type(); - return garrow_data_type_new_raw(&arrow_value_type); -} - -/** - * garrow_list_array_get_value: - * @array: A #GArrowListArray. - * @i: The index of the target value. - * - * Returns: (transfer full): The i-th list. - */ -GArrowArray * -garrow_list_array_get_value(GArrowListArray *array, - gint64 i) -{ - auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array)); - auto arrow_list_array = - static_cast<arrow::ListArray *>(arrow_array.get()); - auto arrow_list = - arrow_list_array->values()->Slice(arrow_list_array->value_offset(i), - arrow_list_array->value_length(i)); - return garrow_array_new_raw(&arrow_list); -} - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/list-array.h ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/list-array.h b/c_glib/arrow-glib/list-array.h deleted file mode 100644 index c49aed1..0000000 --- a/c_glib/arrow-glib/list-array.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include <arrow-glib/array.h> -#include <arrow-glib/data-type.h> - -G_BEGIN_DECLS - -#define GARROW_TYPE_LIST_ARRAY \ - (garrow_list_array_get_type()) -#define GARROW_LIST_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - GARROW_TYPE_LIST_ARRAY, \ - GArrowListArray)) -#define GARROW_LIST_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), \ - GARROW_TYPE_LIST_ARRAY, \ - GArrowListArrayClass)) -#define GARROW_IS_LIST_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - GARROW_TYPE_LIST_ARRAY)) -#define GARROW_IS_LIST_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), \ - GARROW_TYPE_LIST_ARRAY)) -#define GARROW_LIST_ARRAY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), \ - GARROW_TYPE_LIST_ARRAY, \ - GArrowListArrayClass)) - -typedef struct _GArrowListArray GArrowListArray; -typedef struct _GArrowListArrayClass GArrowListArrayClass; - -/** - * GArrowListArray: - * - * It wraps `arrow::ListArray`. - */ -struct _GArrowListArray -{ - /*< private >*/ - GArrowArray parent_instance; -}; - -struct _GArrowListArrayClass -{ - GArrowArrayClass parent_class; -}; - -GType garrow_list_array_get_type(void) G_GNUC_CONST; - -GArrowDataType *garrow_list_array_get_value_type(GArrowListArray *array); -GArrowArray *garrow_list_array_get_value(GArrowListArray *array, - gint64 i); - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/null-array.cpp ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/null-array.cpp b/c_glib/arrow-glib/null-array.cpp deleted file mode 100644 index 0e0ea51..0000000 --- a/c_glib/arrow-glib/null-array.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <arrow-glib/array.hpp> -#include <arrow-glib/null-array.h> - -G_BEGIN_DECLS - -/** - * SECTION: null-array - * @short_description: Null array class - * - * #GArrowNullArray is a class for null array. It can store zero - * or more null values. - * - * #GArrowNullArray is immutable. You need to specify an array length - * to create a new array. - */ - -G_DEFINE_TYPE(GArrowNullArray, \ - garrow_null_array, \ - GARROW_TYPE_ARRAY) - -static void -garrow_null_array_init(GArrowNullArray *object) -{ -} - -static void -garrow_null_array_class_init(GArrowNullArrayClass *klass) -{ -} - -/** - * garrow_null_array_new: - * @length: An array length. - * - * Returns: A newly created #GArrowNullArray. - */ -GArrowNullArray * -garrow_null_array_new(gint64 length) -{ - auto arrow_null_array = std::make_shared<arrow::NullArray>(length); - std::shared_ptr<arrow::Array> arrow_array = arrow_null_array; - auto array = garrow_array_new_raw(&arrow_array); - return GARROW_NULL_ARRAY(array); -} - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/null-array.h ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/null-array.h b/c_glib/arrow-glib/null-array.h deleted file mode 100644 index e25f305..0000000 --- a/c_glib/arrow-glib/null-array.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include <arrow-glib/array.h> - -G_BEGIN_DECLS - -#define GARROW_TYPE_NULL_ARRAY \ - (garrow_null_array_get_type()) -#define GARROW_NULL_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - GARROW_TYPE_NULL_ARRAY, \ - GArrowNullArray)) -#define GARROW_NULL_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), \ - GARROW_TYPE_NULL_ARRAY, \ - GArrowNullArrayClass)) -#define GARROW_IS_NULL_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - GARROW_TYPE_NULL_ARRAY)) -#define GARROW_IS_NULL_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), \ - GARROW_TYPE_NULL_ARRAY)) -#define GARROW_NULL_ARRAY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), \ - GARROW_TYPE_NULL_ARRAY, \ - GArrowNullArrayClass)) - -typedef struct _GArrowNullArray GArrowNullArray; -typedef struct _GArrowNullArrayClass GArrowNullArrayClass; - -/** - * GArrowNullArray: - * - * It wraps `arrow::NullArray`. - */ -struct _GArrowNullArray -{ - /*< private >*/ - GArrowArray parent_instance; -}; - -struct _GArrowNullArrayClass -{ - GArrowArrayClass parent_class; -}; - -GType garrow_null_array_get_type(void) G_GNUC_CONST; - -GArrowNullArray *garrow_null_array_new(gint64 length); - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/string-array.cpp ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/string-array.cpp b/c_glib/arrow-glib/string-array.cpp deleted file mode 100644 index 329c742..0000000 --- a/c_glib/arrow-glib/string-array.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <arrow-glib/array.hpp> -#include <arrow-glib/string-array.h> - -G_BEGIN_DECLS - -/** - * SECTION: string-array - * @short_description: UTF-8 encoded string array class - * - * #GArrowStringArray is a class for UTF-8 encoded string array. It - * can store zero or more UTF-8 encoded string data. - * - * #GArrowStringArray is immutable. You need to use - * #GArrowStringArrayBuilder to create a new array. - */ - -G_DEFINE_TYPE(GArrowStringArray, \ - garrow_string_array, \ - GARROW_TYPE_BINARY_ARRAY) - -static void -garrow_string_array_init(GArrowStringArray *object) -{ -} - -static void -garrow_string_array_class_init(GArrowStringArrayClass *klass) -{ -} - -/** - * garrow_string_array_get_string: - * @array: A #GArrowStringArray. - * @i: The index of the target value. - * - * Returns: The i-th UTF-8 encoded string. - */ -gchar * -garrow_string_array_get_string(GArrowStringArray *array, - gint64 i) -{ - auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array)); - auto arrow_string_array = - static_cast<arrow::StringArray *>(arrow_array.get()); - gint32 length; - auto value = - reinterpret_cast<const gchar *>(arrow_string_array->GetValue(i, &length)); - return g_strndup(value, length); -} - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/string-array.h ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/string-array.h b/c_glib/arrow-glib/string-array.h deleted file mode 100644 index 41a53cd..0000000 --- a/c_glib/arrow-glib/string-array.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include <arrow-glib/binary-array.h> - -G_BEGIN_DECLS - -#define GARROW_TYPE_STRING_ARRAY \ - (garrow_string_array_get_type()) -#define GARROW_STRING_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - GARROW_TYPE_STRING_ARRAY, \ - GArrowStringArray)) -#define GARROW_STRING_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), \ - GARROW_TYPE_STRING_ARRAY, \ - GArrowStringArrayClass)) -#define GARROW_IS_STRING_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - GARROW_TYPE_STRING_ARRAY)) -#define GARROW_IS_STRING_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), \ - GARROW_TYPE_STRING_ARRAY)) -#define GARROW_STRING_ARRAY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), \ - GARROW_TYPE_STRING_ARRAY, \ - GArrowStringArrayClass)) - -typedef struct _GArrowStringArray GArrowStringArray; -typedef struct _GArrowStringArrayClass GArrowStringArrayClass; - -/** - * GArrowStringArray: - * - * It wraps `arrow::StringArray`. - */ -struct _GArrowStringArray -{ - /*< private >*/ - GArrowBinaryArray parent_instance; -}; - -struct _GArrowStringArrayClass -{ - GArrowBinaryArrayClass parent_class; -}; - -GType garrow_string_array_get_type(void) G_GNUC_CONST; - -gchar *garrow_string_array_get_string(GArrowStringArray *array, - gint64 i); - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/struct-array.cpp ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/struct-array.cpp b/c_glib/arrow-glib/struct-array.cpp deleted file mode 100644 index 14c2d17..0000000 --- a/c_glib/arrow-glib/struct-array.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <arrow-glib/array.hpp> -#include <arrow-glib/data-type.hpp> -#include <arrow-glib/struct-array.h> - -G_BEGIN_DECLS - -/** - * SECTION: struct-array - * @short_description: Struct array class - * @include: arrow-glib/arrow-glib.h - * - * #GArrowStructArray is a class for struct array. It can store zero - * or more structs. One struct has zero or more fields. - * - * #GArrowStructArray is immutable. You need to use - * #GArrowStructArrayBuilder to create a new array. - */ - -G_DEFINE_TYPE(GArrowStructArray, \ - garrow_struct_array, \ - GARROW_TYPE_ARRAY) - -static void -garrow_struct_array_init(GArrowStructArray *object) -{ -} - -static void -garrow_struct_array_class_init(GArrowStructArrayClass *klass) -{ -} - -/** - * garrow_struct_array_get_field - * @array: A #GArrowStructArray. - * @i: The index of the field in the struct. - * - * Returns: (transfer full): The i-th field. - */ -GArrowArray * -garrow_struct_array_get_field(GArrowStructArray *array, - gint i) -{ - auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array)); - auto arrow_struct_array = - static_cast<arrow::StructArray *>(arrow_array.get()); - auto arrow_field = arrow_struct_array->field(i); - return garrow_array_new_raw(&arrow_field); -} - -/** - * garrow_struct_array_get_fields - * @array: A #GArrowStructArray. - * - * Returns: (element-type GArrowArray) (transfer full): - * The fields in the struct. - */ -GList * -garrow_struct_array_get_fields(GArrowStructArray *array) -{ - const auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array)); - const auto arrow_struct_array = - static_cast<const arrow::StructArray *>(arrow_array.get()); - - GList *fields = NULL; - for (auto arrow_field : arrow_struct_array->fields()) { - GArrowArray *field = garrow_array_new_raw(&arrow_field); - fields = g_list_prepend(fields, field); - } - - return g_list_reverse(fields); -} - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/struct-array.h ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/struct-array.h b/c_glib/arrow-glib/struct-array.h deleted file mode 100644 index f96e9d4..0000000 --- a/c_glib/arrow-glib/struct-array.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include <arrow-glib/array.h> -#include <arrow-glib/data-type.h> - -G_BEGIN_DECLS - -#define GARROW_TYPE_STRUCT_ARRAY \ - (garrow_struct_array_get_type()) -#define GARROW_STRUCT_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - GARROW_TYPE_STRUCT_ARRAY, \ - GArrowStructArray)) -#define GARROW_STRUCT_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), \ - GARROW_TYPE_STRUCT_ARRAY, \ - GArrowStructArrayClass)) -#define GARROW_IS_STRUCT_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - GARROW_TYPE_STRUCT_ARRAY)) -#define GARROW_IS_STRUCT_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), \ - GARROW_TYPE_STRUCT_ARRAY)) -#define GARROW_STRUCT_ARRAY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), \ - GARROW_TYPE_STRUCT_ARRAY, \ - GArrowStructArrayClass)) - -typedef struct _GArrowStructArray GArrowStructArray; -typedef struct _GArrowStructArrayClass GArrowStructArrayClass; - -/** - * GArrowStructArray: - * - * It wraps `arrow::StructArray`. - */ -struct _GArrowStructArray -{ - /*< private >*/ - GArrowArray parent_instance; -}; - -struct _GArrowStructArrayClass -{ - GArrowArrayClass parent_class; -}; - -GType garrow_struct_array_get_type(void) G_GNUC_CONST; - -GArrowArray *garrow_struct_array_get_field(GArrowStructArray *array, - gint i); -GList *garrow_struct_array_get_fields(GArrowStructArray *array); - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/uint16-array.cpp ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/uint16-array.cpp b/c_glib/arrow-glib/uint16-array.cpp deleted file mode 100644 index 6c416c6..0000000 --- a/c_glib/arrow-glib/uint16-array.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <arrow-glib/array.hpp> -#include <arrow-glib/uint16-array.h> - -G_BEGIN_DECLS - -/** - * SECTION: uint16-array - * @short_description: 16-bit unsigned integer array class - * - * #GArrowUInt16Array is a class for 16-bit unsigned integer array. It - * can store zero or more 16-bit unsigned integer data. - * - * #GArrowUInt16Array is immutable. You need to use - * #GArrowUInt16ArrayBuilder to create a new array. - */ - -G_DEFINE_TYPE(GArrowUInt16Array, \ - garrow_uint16_array, \ - GARROW_TYPE_ARRAY) - -static void -garrow_uint16_array_init(GArrowUInt16Array *object) -{ -} - -static void -garrow_uint16_array_class_init(GArrowUInt16ArrayClass *klass) -{ -} - -/** - * garrow_uint16_array_get_value: - * @array: A #GArrowUInt16Array. - * @i: The index of the target value. - * - * Returns: The i-th value. - */ -guint16 -garrow_uint16_array_get_value(GArrowUInt16Array *array, - gint64 i) -{ - auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array)); - return static_cast<arrow::UInt16Array *>(arrow_array.get())->Value(i); -} - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/uint16-array.h ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/uint16-array.h b/c_glib/arrow-glib/uint16-array.h deleted file mode 100644 index 4472551..0000000 --- a/c_glib/arrow-glib/uint16-array.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include <arrow-glib/array.h> - -G_BEGIN_DECLS - -#define GARROW_TYPE_UINT16_ARRAY \ - (garrow_uint16_array_get_type()) -#define GARROW_UINT16_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - GARROW_TYPE_UINT16_ARRAY, \ - GArrowUInt16Array)) -#define GARROW_UINT16_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), \ - GARROW_TYPE_UINT16_ARRAY, \ - GArrowUInt16ArrayClass)) -#define GARROW_IS_UINT16_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - GARROW_TYPE_UINT16_ARRAY)) -#define GARROW_IS_UINT16_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), \ - GARROW_TYPE_UINT16_ARRAY)) -#define GARROW_UINT16_ARRAY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), \ - GARROW_TYPE_UINT16_ARRAY, \ - GArrowUInt16ArrayClass)) - -typedef struct _GArrowUInt16Array GArrowUInt16Array; -typedef struct _GArrowUInt16ArrayClass GArrowUInt16ArrayClass; - -/** - * GArrowUInt16Array: - * - * It wraps `arrow::UInt16Array`. - */ -struct _GArrowUInt16Array -{ - /*< private >*/ - GArrowArray parent_instance; -}; - -struct _GArrowUInt16ArrayClass -{ - GArrowArrayClass parent_class; -}; - -GType garrow_uint16_array_get_type(void) G_GNUC_CONST; - -guint16 garrow_uint16_array_get_value(GArrowUInt16Array *array, - gint64 i); - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/uint32-array.cpp ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/uint32-array.cpp b/c_glib/arrow-glib/uint32-array.cpp deleted file mode 100644 index 18a9aed..0000000 --- a/c_glib/arrow-glib/uint32-array.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <arrow-glib/array.hpp> -#include <arrow-glib/uint32-array.h> - -G_BEGIN_DECLS - -/** - * SECTION: uint32-array - * @short_description: 32-bit unsigned integer array class - * - * #GArrowUInt32Array is a class for 32-bit unsigned integer array. It - * can store zero or more 32-bit unsigned integer data. - * - * #GArrowUInt32Array is immutable. You need to use - * #GArrowUInt32ArrayBuilder to create a new array. - */ - -G_DEFINE_TYPE(GArrowUInt32Array, \ - garrow_uint32_array, \ - GARROW_TYPE_ARRAY) - -static void -garrow_uint32_array_init(GArrowUInt32Array *object) -{ -} - -static void -garrow_uint32_array_class_init(GArrowUInt32ArrayClass *klass) -{ -} - -/** - * garrow_uint32_array_get_value: - * @array: A #GArrowUInt32Array. - * @i: The index of the target value. - * - * Returns: The i-th value. - */ -guint32 -garrow_uint32_array_get_value(GArrowUInt32Array *array, - gint64 i) -{ - auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array)); - return static_cast<arrow::UInt32Array *>(arrow_array.get())->Value(i); -} - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/uint32-array.h ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/uint32-array.h b/c_glib/arrow-glib/uint32-array.h deleted file mode 100644 index 57d4bea..0000000 --- a/c_glib/arrow-glib/uint32-array.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include <arrow-glib/array.h> - -G_BEGIN_DECLS - -#define GARROW_TYPE_UINT32_ARRAY \ - (garrow_uint32_array_get_type()) -#define GARROW_UINT32_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - GARROW_TYPE_UINT32_ARRAY, \ - GArrowUInt32Array)) -#define GARROW_UINT32_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), \ - GARROW_TYPE_UINT32_ARRAY, \ - GArrowUInt32ArrayClass)) -#define GARROW_IS_UINT32_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - GARROW_TYPE_UINT32_ARRAY)) -#define GARROW_IS_UINT32_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), \ - GARROW_TYPE_UINT32_ARRAY)) -#define GARROW_UINT32_ARRAY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), \ - GARROW_TYPE_UINT32_ARRAY, \ - GArrowUInt32ArrayClass)) - -typedef struct _GArrowUInt32Array GArrowUInt32Array; -typedef struct _GArrowUInt32ArrayClass GArrowUInt32ArrayClass; - -/** - * GArrowUInt32Array: - * - * It wraps `arrow::UInt32Array`. - */ -struct _GArrowUInt32Array -{ - /*< private >*/ - GArrowArray parent_instance; -}; - -struct _GArrowUInt32ArrayClass -{ - GArrowArrayClass parent_class; -}; - -GType garrow_uint32_array_get_type(void) G_GNUC_CONST; - -guint32 garrow_uint32_array_get_value(GArrowUInt32Array *array, - gint64 i); - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/uint64-array.cpp ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/uint64-array.cpp b/c_glib/arrow-glib/uint64-array.cpp deleted file mode 100644 index 1f90084..0000000 --- a/c_glib/arrow-glib/uint64-array.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <arrow-glib/array.hpp> -#include <arrow-glib/uint64-array.h> - -G_BEGIN_DECLS - -/** - * SECTION: uint64-array - * @short_description: 64-bit unsigned integer array class - * - * #GArrowUInt64Array is a class for 64-bit unsigned integer array. It - * can store zero or more 64-bit unsigned integer data. - * - * #GArrowUInt64Array is immutable. You need to use - * #GArrowUInt64ArrayBuilder to create a new array. - */ - -G_DEFINE_TYPE(GArrowUInt64Array, \ - garrow_uint64_array, \ - GARROW_TYPE_ARRAY) - -static void -garrow_uint64_array_init(GArrowUInt64Array *object) -{ -} - -static void -garrow_uint64_array_class_init(GArrowUInt64ArrayClass *klass) -{ -} - -/** - * garrow_uint64_array_get_value: - * @array: A #GArrowUInt64Array. - * @i: The index of the target value. - * - * Returns: The i-th value. - */ -guint64 -garrow_uint64_array_get_value(GArrowUInt64Array *array, - gint64 i) -{ - auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array)); - return static_cast<arrow::UInt64Array *>(arrow_array.get())->Value(i); -} - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/uint64-array.h ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/uint64-array.h b/c_glib/arrow-glib/uint64-array.h deleted file mode 100644 index b5abde5..0000000 --- a/c_glib/arrow-glib/uint64-array.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include <arrow-glib/array.h> - -G_BEGIN_DECLS - -#define GARROW_TYPE_UINT64_ARRAY \ - (garrow_uint64_array_get_type()) -#define GARROW_UINT64_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - GARROW_TYPE_UINT64_ARRAY, \ - GArrowUInt64Array)) -#define GARROW_UINT64_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), \ - GARROW_TYPE_UINT64_ARRAY, \ - GArrowUInt64ArrayClass)) -#define GARROW_IS_UINT64_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - GARROW_TYPE_UINT64_ARRAY)) -#define GARROW_IS_UINT64_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), \ - GARROW_TYPE_UINT64_ARRAY)) -#define GARROW_UINT64_ARRAY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), \ - GARROW_TYPE_UINT64_ARRAY, \ - GArrowUInt64ArrayClass)) - -typedef struct _GArrowUInt64Array GArrowUInt64Array; -typedef struct _GArrowUInt64ArrayClass GArrowUInt64ArrayClass; - -/** - * GArrowUInt64Array: - * - * It wraps `arrow::UInt64Array`. - */ -struct _GArrowUInt64Array -{ - /*< private >*/ - GArrowArray parent_instance; -}; - -struct _GArrowUInt64ArrayClass -{ - GArrowArrayClass parent_class; -}; - -GType garrow_uint64_array_get_type(void) G_GNUC_CONST; - -guint64 garrow_uint64_array_get_value(GArrowUInt64Array *array, - gint64 i); - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/uint8-array.cpp ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/uint8-array.cpp b/c_glib/arrow-glib/uint8-array.cpp deleted file mode 100644 index b5a2595..0000000 --- a/c_glib/arrow-glib/uint8-array.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <arrow-glib/array.hpp> -#include <arrow-glib/uint8-array.h> - -G_BEGIN_DECLS - -/** - * SECTION: uint8-array - * @short_description: 8-bit unsigned integer array class - * - * #GArrowUInt8Array is a class for 8-bit unsigned integer array. It - * can store zero or more 8-bit unsigned integer data. - * - * #GArrowUInt8Array is immutable. You need to use - * #GArrowUInt8ArrayBuilder to create a new array. - */ - -G_DEFINE_TYPE(GArrowUInt8Array, \ - garrow_uint8_array, \ - GARROW_TYPE_ARRAY) - -static void -garrow_uint8_array_init(GArrowUInt8Array *object) -{ -} - -static void -garrow_uint8_array_class_init(GArrowUInt8ArrayClass *klass) -{ -} - -/** - * garrow_uint8_array_get_value: - * @array: A #GArrowUInt8Array. - * @i: The index of the target value. - * - * Returns: The i-th value. - */ -guint8 -garrow_uint8_array_get_value(GArrowUInt8Array *array, - gint64 i) -{ - auto arrow_array = garrow_array_get_raw(GARROW_ARRAY(array)); - return static_cast<arrow::UInt8Array *>(arrow_array.get())->Value(i); -} - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/arrow-glib/uint8-array.h ---------------------------------------------------------------------- diff --git a/c_glib/arrow-glib/uint8-array.h b/c_glib/arrow-glib/uint8-array.h deleted file mode 100644 index a572bc5..0000000 --- a/c_glib/arrow-glib/uint8-array.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#pragma once - -#include <arrow-glib/array.h> - -G_BEGIN_DECLS - -#define GARROW_TYPE_UINT8_ARRAY \ - (garrow_uint8_array_get_type()) -#define GARROW_UINT8_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - GARROW_TYPE_UINT8_ARRAY, \ - GArrowUInt8Array)) -#define GARROW_UINT8_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass), \ - GARROW_TYPE_UINT8_ARRAY, \ - GArrowUInt8ArrayClass)) -#define GARROW_IS_UINT8_ARRAY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - GARROW_TYPE_UINT8_ARRAY)) -#define GARROW_IS_UINT8_ARRAY_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE((klass), \ - GARROW_TYPE_UINT8_ARRAY)) -#define GARROW_UINT8_ARRAY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS((obj), \ - GARROW_TYPE_UINT8_ARRAY, \ - GArrowUInt8ArrayClass)) - -typedef struct _GArrowUInt8Array GArrowUInt8Array; -typedef struct _GArrowUInt8ArrayClass GArrowUInt8ArrayClass; - -/** - * GArrowUInt8Array: - * - * It wraps `arrow::UInt8Array`. - */ -struct _GArrowUInt8Array -{ - /*< private >*/ - GArrowArray parent_instance; -}; - -struct _GArrowUInt8ArrayClass -{ - GArrowArrayClass parent_class; -}; - -GType garrow_uint8_array_get_type(void) G_GNUC_CONST; - -guint8 garrow_uint8_array_get_value(GArrowUInt8Array *array, - gint64 i); - -G_END_DECLS http://git-wip-us.apache.org/repos/asf/arrow/blob/7c1fef51/c_glib/doc/reference/arrow-glib-docs.sgml ---------------------------------------------------------------------- diff --git a/c_glib/doc/reference/arrow-glib-docs.sgml b/c_glib/doc/reference/arrow-glib-docs.sgml index 3c1d8d1..11e6a4d 100644 --- a/c_glib/doc/reference/arrow-glib-docs.sgml +++ b/c_glib/doc/reference/arrow-glib-docs.sgml @@ -36,22 +36,6 @@ <chapter id="array"> <title>Array</title> <xi:include href="xml/array.xml"/> - <xi:include href="xml/null-array.xml"/> - <xi:include href="xml/boolean-array.xml"/> - <xi:include href="xml/int8-array.xml"/> - <xi:include href="xml/uint8-array.xml"/> - <xi:include href="xml/int16-array.xml"/> - <xi:include href="xml/uint16-array.xml"/> - <xi:include href="xml/int32-array.xml"/> - <xi:include href="xml/uint32-array.xml"/> - <xi:include href="xml/int64-array.xml"/> - <xi:include href="xml/uint64-array.xml"/> - <xi:include href="xml/float-array.xml"/> - <xi:include href="xml/double-array.xml"/> - <xi:include href="xml/binary-array.xml"/> - <xi:include href="xml/string-array.xml"/> - <xi:include href="xml/list-array.xml"/> - <xi:include href="xml/struct-array.xml"/> </chapter> <chapter id="array-builder"> <title>Array builder</title>
