char_types_enum.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2022, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include <cstdint>
19 #include <type_traits>
20 
21 namespace cudf {
22 namespace strings {
38 enum string_character_types : uint32_t {
39  DECIMAL = 1 << 0,
40  NUMERIC = 1 << 1,
41  DIGIT = 1 << 2,
42  ALPHA = 1 << 3,
43  SPACE = 1 << 4,
44  UPPER = 1 << 5,
45  LOWER = 1 << 6,
49 };
50 
59 {
60  return static_cast<string_character_types>(
61  static_cast<std::underlying_type_t<string_character_types>>(lhs) |
62  static_cast<std::underlying_type_t<string_character_types>>(rhs));
63 }
64 
74 {
75  lhs = static_cast<string_character_types>(
76  static_cast<std::underlying_type_t<string_character_types>>(lhs) |
77  static_cast<std::underlying_type_t<string_character_types>>(rhs));
78  return lhs;
79 }
80  // end of doxygen group
82 } // namespace strings
83 } // namespace cudf
constexpr string_character_types & operator|=(string_character_types &lhs, string_character_types rhs)
Compound assignment OR operator for combining string_character_types.
constexpr string_character_types operator|(string_character_types lhs, string_character_types rhs)
OR operator for combining string_character_types.
string_character_types
Character type values. These types can be or'd to check for any combination of types.
@ CASE_TYPES
all case-able characters
@ ALPHANUM
all alphanumeric characters
@ UPPER
all upper case characters
@ DIGIT
all digit characters
@ ALL_TYPES
all character types
@ DECIMAL
all decimal characters
@ SPACE
all space characters
@ NUMERIC
all numeric characters
@ LOWER
all lower case characters
@ ALPHA
all alphabetic characters
cuDF interfaces
Definition: aggregation.hpp:34