Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-17 08:28:54

0001 // Licensed to the Apache Software Foundation (ASF) under one
0002 // or more contributor license agreements.  See the NOTICE file
0003 // distributed with this work for additional information
0004 // regarding copyright ownership.  The ASF licenses this file
0005 // to you under the Apache License, Version 2.0 (the
0006 // "License"); you may not use this file except in compliance
0007 // with the License.  You may obtain a copy of the License at
0008 //
0009 //   http://www.apache.org/licenses/LICENSE-2.0
0010 //
0011 // Unless required by applicable law or agreed to in writing,
0012 // software distributed under the License is distributed on an
0013 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
0014 // KIND, either express or implied.  See the License for the
0015 // specific language governing permissions and limitations
0016 // under the License.
0017 
0018 #pragma once
0019 
0020 #include <cstdint>
0021 #include <memory>
0022 
0023 #include "arrow/buffer.h"         // IWYU pragma: export
0024 #include "arrow/io/interfaces.h"  // IWYU pragma: export
0025 #include "arrow/status.h"         // IWYU pragma: export
0026 #include "arrow/type_fwd.h"       // IWYU pragma: export
0027 #include "arrow/util/macros.h"    // IWYU pragma: export
0028 
0029 #if defined(_WIN32) || defined(__CYGWIN__)
0030 
0031 #  if defined(_MSC_VER)
0032 #    pragma warning(push)
0033 // Disable warning for STL types usage in DLL interface
0034 // https://web.archive.org/web/20130317015847/http://connect.microsoft.com/VisualStudio/feedback/details/696593/vc-10-vs-2010-basic-string-exports
0035 #    pragma warning(disable : 4275 4251)
0036 // Disable diamond inheritance warnings
0037 #    pragma warning(disable : 4250)
0038 // Disable macro redefinition warnings
0039 #    pragma warning(disable : 4005)
0040 // Disable extern before exported template warnings
0041 #    pragma warning(disable : 4910)
0042 #  else
0043 #    pragma GCC diagnostic ignored "-Wattributes"
0044 #  endif
0045 
0046 #  ifdef PARQUET_STATIC
0047 #    define PARQUET_EXPORT
0048 #  elif defined(PARQUET_EXPORTING)
0049 #    define PARQUET_EXPORT __declspec(dllexport)
0050 #  else
0051 #    define PARQUET_EXPORT __declspec(dllimport)
0052 #  endif
0053 
0054 #  define PARQUET_NO_EXPORT
0055 
0056 #else  // Not Windows
0057 #  ifndef PARQUET_EXPORT
0058 #    define PARQUET_EXPORT __attribute__((visibility("default")))
0059 #  endif
0060 #  ifndef PARQUET_NO_EXPORT
0061 #    define PARQUET_NO_EXPORT __attribute__((visibility("hidden")))
0062 #  endif
0063 #endif  // Non-Windows
0064 
0065 // This is a complicated topic, some reading on it:
0066 // http://www.codesynthesis.com/~boris/blog/2010/01/18/dll-export-cxx-templates/
0067 #if defined(_MSC_VER) || defined(__clang__)
0068 #  define PARQUET_TEMPLATE_CLASS_EXPORT
0069 #  define PARQUET_TEMPLATE_EXPORT PARQUET_EXPORT
0070 #else
0071 #  define PARQUET_TEMPLATE_CLASS_EXPORT PARQUET_EXPORT
0072 #  define PARQUET_TEMPLATE_EXPORT
0073 #endif
0074 
0075 #define PARQUET_DISALLOW_COPY_AND_ASSIGN ARROW_DISALLOW_COPY_AND_ASSIGN
0076 
0077 #define PARQUET_NORETURN ARROW_NORETURN
0078 #define PARQUET_DEPRECATED ARROW_DEPRECATED
0079 
0080 // If ARROW_VALGRIND set when compiling unit tests, also define
0081 // PARQUET_VALGRIND
0082 #ifdef ARROW_VALGRIND
0083 #  define PARQUET_VALGRIND
0084 #endif
0085 
0086 namespace parquet {
0087 
0088 using Buffer = ::arrow::Buffer;
0089 using Codec = ::arrow::util::Codec;
0090 using CodecOptions = ::arrow::util::CodecOptions;
0091 using Compression = ::arrow::Compression;
0092 using MemoryPool = ::arrow::MemoryPool;
0093 using MutableBuffer = ::arrow::MutableBuffer;
0094 using ResizableBuffer = ::arrow::ResizableBuffer;
0095 using ResizableBuffer = ::arrow::ResizableBuffer;
0096 using ArrowInputFile = ::arrow::io::RandomAccessFile;
0097 using ArrowInputStream = ::arrow::io::InputStream;
0098 using ArrowOutputStream = ::arrow::io::OutputStream;
0099 
0100 constexpr int64_t kDefaultOutputStreamSize = 1024;
0101 
0102 constexpr int16_t kNonPageOrdinal = static_cast<int16_t>(-1);
0103 
0104 PARQUET_EXPORT
0105 std::shared_ptr<::arrow::io::BufferOutputStream> CreateOutputStream(
0106     ::arrow::MemoryPool* pool = ::arrow::default_memory_pool());
0107 
0108 PARQUET_EXPORT
0109 std::shared_ptr<ResizableBuffer> AllocateBuffer(
0110     ::arrow::MemoryPool* pool = ::arrow::default_memory_pool(), int64_t size = 0);
0111 
0112 }  // namespace parquet