Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
visitor.h
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing,
12 // software distributed under the License is distributed on an
13 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, either express or implied. See the License for the
15 // specific language governing permissions and limitations
16 // under the License.
17 
18 #ifndef ARROW_VISITOR_H
19 #define ARROW_VISITOR_H
20 
21 #include "arrow/status.h"
22 #include "arrow/type_fwd.h"
23 #include "arrow/util/visibility.h"
24 
25 namespace arrow {
26 
27 class ARROW_EXPORT ArrayVisitor {
28  public:
29  virtual ~ArrayVisitor() = default;
30 
31  virtual Status Visit(const NullArray& array);
32  virtual Status Visit(const BooleanArray& array);
33  virtual Status Visit(const Int8Array& array);
34  virtual Status Visit(const Int16Array& array);
35  virtual Status Visit(const Int32Array& array);
36  virtual Status Visit(const Int64Array& array);
37  virtual Status Visit(const UInt8Array& array);
38  virtual Status Visit(const UInt16Array& array);
39  virtual Status Visit(const UInt32Array& array);
40  virtual Status Visit(const UInt64Array& array);
41  virtual Status Visit(const HalfFloatArray& array);
42  virtual Status Visit(const FloatArray& array);
43  virtual Status Visit(const DoubleArray& array);
44  virtual Status Visit(const StringArray& array);
45  virtual Status Visit(const BinaryArray& array);
46  virtual Status Visit(const FixedSizeBinaryArray& array);
47  virtual Status Visit(const Date32Array& array);
48  virtual Status Visit(const Date64Array& array);
49  virtual Status Visit(const Time32Array& array);
50  virtual Status Visit(const Time64Array& array);
51  virtual Status Visit(const TimestampArray& array);
52  virtual Status Visit(const IntervalArray& array);
53  virtual Status Visit(const DecimalArray& array);
54  virtual Status Visit(const ListArray& array);
55  virtual Status Visit(const StructArray& array);
56  virtual Status Visit(const UnionArray& array);
57  virtual Status Visit(const DictionaryArray& type);
58 };
59 
60 class ARROW_EXPORT TypeVisitor {
61  public:
62  virtual ~TypeVisitor() = default;
63 
64  virtual Status Visit(const NullType& type);
65  virtual Status Visit(const BooleanType& type);
66  virtual Status Visit(const Int8Type& type);
67  virtual Status Visit(const Int16Type& type);
68  virtual Status Visit(const Int32Type& type);
69  virtual Status Visit(const Int64Type& type);
70  virtual Status Visit(const UInt8Type& type);
71  virtual Status Visit(const UInt16Type& type);
72  virtual Status Visit(const UInt32Type& type);
73  virtual Status Visit(const UInt64Type& type);
74  virtual Status Visit(const HalfFloatType& type);
75  virtual Status Visit(const FloatType& type);
76  virtual Status Visit(const DoubleType& type);
77  virtual Status Visit(const StringType& type);
78  virtual Status Visit(const BinaryType& type);
79  virtual Status Visit(const FixedSizeBinaryType& type);
80  virtual Status Visit(const Date64Type& type);
81  virtual Status Visit(const Date32Type& type);
82  virtual Status Visit(const Time32Type& type);
83  virtual Status Visit(const Time64Type& type);
84  virtual Status Visit(const TimestampType& type);
85  virtual Status Visit(const IntervalType& type);
86  virtual Status Visit(const DecimalType& type);
87  virtual Status Visit(const ListType& type);
88  virtual Status Visit(const StructType& type);
89  virtual Status Visit(const UnionType& type);
90  virtual Status Visit(const DictionaryType& type);
91 };
92 
93 } // namespace arrow
94 
95 #endif // ARROW_VISITOR_H
Definition: type.h:485
Definition: array.h:536
Definition: array.h:339
Definition: type.h:387
Definition: type.h:339
Definition: array.h:563
Definition: type.h:401
Definition: array.h:367
Date as int64_t milliseconds since UNIX epoch.
Definition: type.h:580
Definition: status.h:106
Definition: type.h:351
Definition: type.h:657
Definition: type.h:363
Definition: type.h:312
Definition: type.h:433
Definition: visitor.h:60
Definition: type.h:326
Definition: type.h:684
Definition: type.h:408
Definition: type.h:474
Definition: type.h:501
Definition: visitor.h:27
Definition: array.h:513
Top-level namespace for Apache Arrow C++ API.
Definition: allocator.h:29
Definition: array.h:389
Definition: type.h:394
Definition: type.h:357
Definition: type.h:369
Date as int32_t days since UNIX epoch.
Definition: type.h:563
Definition: array.h:446
Definition: array.h:601
Definition: array.h:659
Definition: type.h:709
Definition: type.h:642
Definition: type.h:375
Definition: array.h:578
Definition: type.h:345
Definition: type.h:627
Definition: type.h:522
Definition: type.h:381
Definition: type.h:451
Degenerate null type Array.
Definition: array.h:293