Visitor pattern for Iceberg types Adapted from Apache Arrow https://github.com/apache/arrow/blob/main/cpp/src/arrow/visit_type_inline.h.
More...
Go to the source code of this file.
|
| namespace | iceberg |
| | Core Apache Iceberg C++ APIs.
|
| |
|
| template<typename VISITOR , typename... ARGS> |
| Status | iceberg::VisitTypeInline (const Type &type, VISITOR *visitor, ARGS &&... args) |
| | Calls visitor with the corresponding concrete type class.
|
| |
| template<typename VISITOR , typename... ARGS> |
| auto | iceberg::VisitType (const Type &type, VISITOR &&visitor, ARGS &&... args) -> decltype(std::forward< VISITOR >(visitor)(type, args...)) |
| | Call visitor with the corresponding concrete type class.
|
| |
| template<typename VISITOR , typename... ARGS> |
| Status | iceberg::VisitTypeIdInline (TypeId id, VISITOR *visitor, ARGS &&... args) |
| | Calls visitor with a nullptr of the corresponding concrete type class.
|
| |
| template<typename VISITOR , typename... ARGS> |
| auto | iceberg::VisitTypeCategory (const Type &type, VISITOR *visitor, ARGS &&... args) |
| | Visit a type using a categorical visitor pattern.
|
| |
◆ SCHEMA_VISIT_ACTION
| #define SCHEMA_VISIT_ACTION |
( |
|
TYPE_CLASS | ) |
|
Value: return visitor->Visit##TYPE_CLASS( \
internal::checked_cast<const TYPE_CLASS##Type&>(type), \
std::forward<ARGS>(args)...);
◆ TYPE_ID_VISIT_INLINE
| #define TYPE_ID_VISIT_INLINE |
( |
|
TYPE_CLASS | ) |
|
Value: case TYPE_CLASS##Type::kTypeId: { \
const TYPE_CLASS##Type* concrete_ptr = nullptr; \
return visitor->Visit(concrete_ptr, std::forward<ARGS>(args)...); \
}
◆ TYPE_VISIT_INLINE [1/2]
| #define TYPE_VISIT_INLINE |
( |
|
TYPE_CLASS | ) |
|
Value: case TYPE_CLASS##Type::kTypeId: \
return visitor->Visit( \
iceberg::internal::checked_cast<const TYPE_CLASS##Type&>(type), \
std::forward<ARGS>(args)...);
◆ TYPE_VISIT_INLINE [2/2]
| #define TYPE_VISIT_INLINE |
( |
|
TYPE_CLASS | ) |
|
Value: case TYPE_CLASS##Type::kTypeId: \
return std::forward<VISITOR>(visitor)( \
internal::checked_cast<const TYPE_CLASS##Type&>(type), \
std::forward<ARGS>(args)...);