char_types_enum.hpp
转到此文件的文档。
1 /*
2  * 版权所有 (c) 2019-2024, NVIDIA CORPORATION。
3  *
4  * 根据 Apache 许可证 2.0 版(“许可证”)获得许可;
5  * 除非遵守许可证,否则不得使用此文件。
6  * 您可以获得许可证的副本,地址如下:
7  *
8  * https://apache.ac.cn/licenses/LICENSE-2.0
9  *
10  * 除非适用法律要求或书面同意,否则软件
11  * 根据许可证分发,是基于“按原样”的基础进行分发,
12  * 不提供任何明示或暗示的担保或条件。
13  * 有关管理权限和
14  * 限制的具体语言,请参见许可证。
15  */
16 #pragma once
17 
18 #include <cstdint>
19 #include <type_traits>
20 
21 namespace CUDF_EXPORT 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  // doxygen 组结束
82 } // namespace strings
83 } // namespace CUDF_EXPORT cudf
constexpr string_character_types & operator|=(string_character_types &lhs, string_character_types rhs)
用于组合 string_character_types 的复合赋值 OR 运算符。
constexpr string_character_types operator|(string_character_types lhs, string_character_types rhs)
用于组合 string_character_types 的 OR 运算符。
string_character_types
字符类型值。这些类型可以进行 OR 运算以检查任意类型的组合。
@ CASE_TYPES
所有可区分大小写的字符
@ ALPHANUM
所有字母数字字符
@ UPPER
所有大写字符
@ DIGIT
所有数字字符
@ ALL_TYPES
所有字符类型
@ DECIMAL
所有十进制字符
@ SPACE
所有空格字符
@ NUMERIC
所有数字字符
@ LOWER
所有小写字符
@ ALPHA
所有字母字符
cuDF 接口
定义: host_udf.hpp:37