forked from cel-expr/cel-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathid.h
More file actions
40 lines (30 loc) · 888 Bytes
/
Copy pathid.h
File metadata and controls
40 lines (30 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef THIRD_PARTY_CEL_CPP_COMMON_ID_H_
#define THIRD_PARTY_CEL_CPP_COMMON_ID_H_
#include "internal/cel_printer.h"
#include "internal/handle.h"
#include "internal/hash_util.h"
namespace google {
namespace api {
namespace expr {
namespace common {
// A expression, statement, or variable id.
class Id : public internal::Handle<int32_t, Id> {
public:
constexpr explicit Id(int32_t value) : Handle(value) {}
inline std::string ToDebugString() const {
return internal::ToCallString("Id", value_);
}
};
inline std::ostream& operator<<(std::ostream& os, Id arg) {
return os << arg.ToDebugString();
}
} // namespace common
} // namespace expr
} // namespace api
} // namespace google
namespace std {
template <>
struct hash<google::api::expr::common::Id>
: google::api::expr::common::Id::Hasher {};
} // namespace std
#endif // THIRD_PARTY_CEL_CPP_COMMON_ID_H_