Skip to content

Commit 91d2e07

Browse files
committed
1. TypeProxyTraits -> ProxyTraits 2. ArrayProxyType -> ArrayProxy 3. TypeProxyType -> TypeProxy
1 parent 0312697 commit 91d2e07

File tree

1 file changed

+67
-67
lines changed
  • matlab/src/cpp/arrow/matlab/proxy

1 file changed

+67
-67
lines changed

matlab/src/cpp/arrow/matlab/proxy/wrap.cc

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -37,133 +37,133 @@ namespace arrow::matlab::proxy {
3737

3838
namespace {
3939
template <typename T>
40-
struct TypeProxyTraits {};
40+
struct ProxyTraits {};
4141

4242
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>;
4646
};
4747

4848
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>;
5252
};
5353

5454
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>;
5858
};
5959

6060
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>;
6464
};
6565

6666
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>;
7070
};
7171

7272
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>;
7676
};
7777

7878
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>;
8282
};
8383

8484
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>;
8888
};
8989

9090
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>;
9494
};
9595

9696
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>;
100100
};
101101

102102
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>;
106106
};
107107

108108
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;
112112
};
113113

114114
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;
118118
};
119119

120120
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;
124124
};
125125

126126
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;
130130
};
131131

132132
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;
136136
};
137137

138138
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;
142142
};
143143

144144
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;
148148
};
149149

150150
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;
154154
};
155155

156156
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) {
158158
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));
161161
}
162162

163163
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));
167167
}
168168

169169
arrow::Type::type get_type_id(const std::shared_ptr<arrow::Array>& array) {
@@ -205,7 +205,7 @@ namespace arrow::matlab::proxy {
205205
};
206206

207207
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) {
209209
using ID = arrow::Type::type;
210210
switch (get_type_id(input)) {
211211
case ID::BOOL:
@@ -255,7 +255,7 @@ namespace arrow::matlab::proxy {
255255

256256
arrow::Result<std::shared_ptr<arrow::matlab::array::proxy::Array>> wrap(const std::shared_ptr<arrow::Array>& array) {
257257
WrapArrayFunctor functor;
258-
return do_wrap(array, functor);
258+
return wrap(array, functor);
259259
}
260260

261261
arrow::Result<::matlab::data::StructArray> wrap_and_manage(const std::shared_ptr<arrow::Array>& array) {
@@ -273,6 +273,6 @@ namespace arrow::matlab::proxy {
273273

274274
arrow::Result<std::shared_ptr<arrow::matlab::type::proxy::Type>> wrap(const std::shared_ptr<arrow::DataType>& datatype) {
275275
WrapTypeFunctor functor;
276-
return do_wrap(datatype, functor);
276+
return wrap(datatype, functor);
277277
}
278278
}

0 commit comments

Comments
 (0)