sparrow 0.9.0
Loading...
Searching...
No Matches
time_array.hpp
Go to the documentation of this file.
1// Copyright 2024 Man Group Operations Limited
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
19
20// tts : std::chrono::seconds
21
22namespace sparrow
23{
24 using time_types_t = mpl::
25 typelist<chrono::time_seconds, chrono::time_milliseconds, chrono::time_microseconds, chrono::time_nanoseconds>;
26
27 template <typename T>
29
30 namespace detail
31 {
32 template <>
37
38 template <>
39 struct primitive_data_traits<chrono::time_milliseconds>
40 {
42 };
43
44 template <>
45 struct primitive_data_traits<chrono::time_microseconds>
46 {
48 };
49
50 template <>
51 struct primitive_data_traits<chrono::time_nanoseconds>
52 {
54 };
55 }
56
69 template <time_type T>
71
92
93 template <class T>
94 struct is_time_array : std::false_type
95 {
96 };
97
98 template <class T>
99 struct is_time_array<time_array<T>> : std::true_type
100 {
101 };
102
106 template <class T>
108}
consteval bool contains()
Checks if a typelist contains a specific type.
Definition mp_utils.hpp:633
time_array< chrono::time_microseconds > time_microseconds_array
A time array for std::chrono::time_microseconds values.
time_array< chrono::time_milliseconds > time_milliseconds_array
A time array for std::chrono::time_milliseconds values.
primitive_array_impl< T > time_array
Array of time values.
mpl:: typelist< chrono::time_seconds, chrono::time_milliseconds, chrono::time_microseconds, chrono::time_nanoseconds > time_types_t
constexpr bool is_time_array_v
Checks whether T is a time_array type.
time_array< chrono::time_nanoseconds > time_nanoseconds_array
A time array for std::chrono::time_nanoseconds values.
time_array< chrono::time_seconds > time_seconds_array
A time array for std::chrono::time_seconds values.
data_type
Runtime identifier of arrow data types, usually associated with raw bytes with the associated value.