@@ -37,133 +37,133 @@ namespace arrow::matlab::proxy {
37
37
38
38
namespace {
39
39
template <typename T>
40
- struct TypeProxyTraits {};
40
+ struct ProxyTraits {};
41
41
42
42
template <>
43
- struct TypeProxyTraits <arrow::BooleanType> {
44
- using ArrayProxyType = arrow::matlab::array::proxy::BooleanArray;
45
- using TypeProxyType = arrow::matlab::type::proxy::PrimitiveCType<bool >;
43
+ struct ProxyTraits <arrow::BooleanType> {
44
+ using ArrayProxy = arrow::matlab::array::proxy::BooleanArray;
45
+ using TypeProxy = arrow::matlab::type::proxy::PrimitiveCType<bool >;
46
46
};
47
47
48
48
template <>
49
- struct TypeProxyTraits <arrow::Int8Type> {
50
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::Int8Type>;
51
- using TypeProxyType = arrow::matlab::type::proxy::PrimitiveCType<int8_t >;
49
+ struct ProxyTraits <arrow::Int8Type> {
50
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::Int8Type>;
51
+ using TypeProxy = arrow::matlab::type::proxy::PrimitiveCType<int8_t >;
52
52
};
53
53
54
54
template <>
55
- struct TypeProxyTraits <arrow::Int16Type> {
56
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::Int16Type>;
57
- using TypeProxyType = arrow::matlab::type::proxy::PrimitiveCType<int16_t >;
55
+ struct ProxyTraits <arrow::Int16Type> {
56
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::Int16Type>;
57
+ using TypeProxy = arrow::matlab::type::proxy::PrimitiveCType<int16_t >;
58
58
};
59
59
60
60
template <>
61
- struct TypeProxyTraits <arrow::Int32Type> {
62
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::Int32Type>;
63
- using TypeProxyType = arrow::matlab::type::proxy::PrimitiveCType<int32_t >;
61
+ struct ProxyTraits <arrow::Int32Type> {
62
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::Int32Type>;
63
+ using TypeProxy = arrow::matlab::type::proxy::PrimitiveCType<int32_t >;
64
64
};
65
65
66
66
template <>
67
- struct TypeProxyTraits <arrow::Int64Type> {
68
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::Int64Type>;
69
- using TypeProxyType = arrow::matlab::type::proxy::PrimitiveCType<int64_t >;
67
+ struct ProxyTraits <arrow::Int64Type> {
68
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::Int64Type>;
69
+ using TypeProxy = arrow::matlab::type::proxy::PrimitiveCType<int64_t >;
70
70
};
71
71
72
72
template <>
73
- struct TypeProxyTraits <arrow::UInt8Type> {
74
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::UInt8Type>;
75
- using TypeProxyType = arrow::matlab::type::proxy::PrimitiveCType<uint8_t >;
73
+ struct ProxyTraits <arrow::UInt8Type> {
74
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::UInt8Type>;
75
+ using TypeProxy = arrow::matlab::type::proxy::PrimitiveCType<uint8_t >;
76
76
};
77
77
78
78
template <>
79
- struct TypeProxyTraits <arrow::UInt16Type> {
80
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::UInt16Type>;
81
- using TypeProxyType = arrow::matlab::type::proxy::PrimitiveCType<uint16_t >;
79
+ struct ProxyTraits <arrow::UInt16Type> {
80
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::UInt16Type>;
81
+ using TypeProxy = arrow::matlab::type::proxy::PrimitiveCType<uint16_t >;
82
82
};
83
83
84
84
template <>
85
- struct TypeProxyTraits <arrow::UInt32Type> {
86
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::UInt32Type>;
87
- using TypeProxyType = arrow::matlab::type::proxy::PrimitiveCType<uint32_t >;
85
+ struct ProxyTraits <arrow::UInt32Type> {
86
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::UInt32Type>;
87
+ using TypeProxy = arrow::matlab::type::proxy::PrimitiveCType<uint32_t >;
88
88
};
89
89
90
90
template <>
91
- struct TypeProxyTraits <arrow::UInt64Type> {
92
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::UInt64Type>;
93
- using TypeProxyType = arrow::matlab::type::proxy::PrimitiveCType<uint64_t >;
91
+ struct ProxyTraits <arrow::UInt64Type> {
92
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::UInt64Type>;
93
+ using TypeProxy = arrow::matlab::type::proxy::PrimitiveCType<uint64_t >;
94
94
};
95
95
96
96
template <>
97
- struct TypeProxyTraits <arrow::FloatType> {
98
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::FloatType>;
99
- using TypeProxyType = arrow::matlab::type::proxy::PrimitiveCType<float >;
97
+ struct ProxyTraits <arrow::FloatType> {
98
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::FloatType>;
99
+ using TypeProxy = arrow::matlab::type::proxy::PrimitiveCType<float >;
100
100
};
101
101
102
102
template <>
103
- struct TypeProxyTraits <arrow::DoubleType> {
104
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::DoubleType>;
105
- using TypeProxyType = arrow::matlab::type::proxy::PrimitiveCType<double >;
103
+ struct ProxyTraits <arrow::DoubleType> {
104
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::DoubleType>;
105
+ using TypeProxy = arrow::matlab::type::proxy::PrimitiveCType<double >;
106
106
};
107
107
108
108
template <>
109
- struct TypeProxyTraits <arrow::Time32Type> {
110
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::Time32Type>;
111
- using TypeProxyType = arrow::matlab::type::proxy::Time32Type;
109
+ struct ProxyTraits <arrow::Time32Type> {
110
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::Time32Type>;
111
+ using TypeProxy = arrow::matlab::type::proxy::Time32Type;
112
112
};
113
113
114
114
template <>
115
- struct TypeProxyTraits <arrow::Time64Type> {
116
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::Time64Type>;
117
- using TypeProxyType = arrow::matlab::type::proxy::Time64Type;
115
+ struct ProxyTraits <arrow::Time64Type> {
116
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::Time64Type>;
117
+ using TypeProxy = arrow::matlab::type::proxy::Time64Type;
118
118
};
119
119
120
120
template <>
121
- struct TypeProxyTraits <arrow::Date32Type> {
122
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::Date32Type>;
123
- using TypeProxyType = arrow::matlab::type::proxy::Date32Type;
121
+ struct ProxyTraits <arrow::Date32Type> {
122
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::Date32Type>;
123
+ using TypeProxy = arrow::matlab::type::proxy::Date32Type;
124
124
};
125
125
126
126
template <>
127
- struct TypeProxyTraits <arrow::Date64Type> {
128
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::Date64Type>;
129
- using TypeProxyType = arrow::matlab::type::proxy::Date64Type;
127
+ struct ProxyTraits <arrow::Date64Type> {
128
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::Date64Type>;
129
+ using TypeProxy = arrow::matlab::type::proxy::Date64Type;
130
130
};
131
131
132
132
template <>
133
- struct TypeProxyTraits <arrow::TimestampType> {
134
- using ArrayProxyType = arrow::matlab::array::proxy::NumericArray<arrow::TimestampType>;
135
- using TypeProxyType = arrow::matlab::type::proxy::TimestampType;
133
+ struct ProxyTraits <arrow::TimestampType> {
134
+ using ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::TimestampType>;
135
+ using TypeProxy = arrow::matlab::type::proxy::TimestampType;
136
136
};
137
137
138
138
template <>
139
- struct TypeProxyTraits <arrow::StringType> {
140
- using ArrayProxyType = arrow::matlab::array::proxy::StringArray;
141
- using TypeProxyType = arrow::matlab::type::proxy::StringType;
139
+ struct ProxyTraits <arrow::StringType> {
140
+ using ArrayProxy = arrow::matlab::array::proxy::StringArray;
141
+ using TypeProxy = arrow::matlab::type::proxy::StringType;
142
142
};
143
143
144
144
template <>
145
- struct TypeProxyTraits <arrow::ListType> {
146
- using ArrayProxyType = arrow::matlab::array::proxy::ListArray;
147
- using TypeProxyType = arrow::matlab::type::proxy::ListType;
145
+ struct ProxyTraits <arrow::ListType> {
146
+ using ArrayProxy = arrow::matlab::array::proxy::ListArray;
147
+ using TypeProxy = arrow::matlab::type::proxy::ListType;
148
148
};
149
149
150
150
template <>
151
- struct TypeProxyTraits <arrow::StructType> {
152
- using ArrayProxyType = arrow::matlab::array::proxy::StructArray;
153
- using TypeProxyType = arrow::matlab::type::proxy::StructType;
151
+ struct ProxyTraits <arrow::StructType> {
152
+ using ArrayProxy = arrow::matlab::array::proxy::StructArray;
153
+ using TypeProxy = arrow::matlab::type::proxy::StructType;
154
154
};
155
155
156
156
template <typename ArrowType>
157
- std::shared_ptr<typename TypeProxyTraits <ArrowType>::ArrayProxyType > make_proxy (const std::shared_ptr<arrow::Array>& array) {
157
+ std::shared_ptr<typename ProxyTraits <ArrowType>::ArrayProxy > make_proxy (const std::shared_ptr<arrow::Array>& array) {
158
158
using ArrowArrayType = typename arrow::TypeTraits<ArrowType>::ArrayType;
159
- using ArrayProxyType = typename TypeProxyTraits <ArrowType>::ArrayProxyType ;
160
- return std::make_shared<ArrayProxyType >(std::static_pointer_cast<ArrowArrayType>(array));
159
+ using ArrayProxy = typename ProxyTraits <ArrowType>::ArrayProxy ;
160
+ return std::make_shared<ArrayProxy >(std::static_pointer_cast<ArrowArrayType>(array));
161
161
}
162
162
163
163
template <typename ArrowType>
164
- std::shared_ptr<typename TypeProxyTraits <ArrowType>::TypeProxyType > make_proxy (const std::shared_ptr<arrow::DataType>& datatype) {
165
- using TypeProxyType = typename TypeProxyTraits <ArrowType>::TypeProxyType ;
166
- return std::make_shared<TypeProxyType >(std::static_pointer_cast<ArrowType>(datatype));
164
+ std::shared_ptr<typename ProxyTraits <ArrowType>::TypeProxy > make_proxy (const std::shared_ptr<arrow::DataType>& datatype) {
165
+ using TypeProxy = typename ProxyTraits <ArrowType>::TypeProxy ;
166
+ return std::make_shared<TypeProxy >(std::static_pointer_cast<ArrowType>(datatype));
167
167
}
168
168
169
169
arrow::Type::type get_type_id (const std::shared_ptr<arrow::Array>& array) {
@@ -205,7 +205,7 @@ namespace arrow::matlab::proxy {
205
205
};
206
206
207
207
template <typename Function>
208
- arrow::Result<std::shared_ptr<typename Function::OutputType>> do_wrap (const std::shared_ptr<typename Function::InputType>& input, const Function& func) {
208
+ arrow::Result<std::shared_ptr<typename Function::OutputType>> wrap (const std::shared_ptr<typename Function::InputType>& input, const Function& func) {
209
209
using ID = arrow::Type::type;
210
210
switch (get_type_id (input)) {
211
211
case ID::BOOL:
@@ -255,7 +255,7 @@ namespace arrow::matlab::proxy {
255
255
256
256
arrow::Result<std::shared_ptr<arrow::matlab::array::proxy::Array>> wrap (const std::shared_ptr<arrow::Array>& array) {
257
257
WrapArrayFunctor functor;
258
- return do_wrap (array, functor);
258
+ return wrap (array, functor);
259
259
}
260
260
261
261
arrow::Result<::matlab::data::StructArray> wrap_and_manage (const std::shared_ptr<arrow::Array>& array) {
@@ -273,6 +273,6 @@ namespace arrow::matlab::proxy {
273
273
274
274
arrow::Result<std::shared_ptr<arrow::matlab::type::proxy::Type>> wrap (const std::shared_ptr<arrow::DataType>& datatype) {
275
275
WrapTypeFunctor functor;
276
- return do_wrap (datatype, functor);
276
+ return wrap (datatype, functor);
277
277
}
278
278
}
0 commit comments