9template<fishnet::FieldValueType T>
16 static inline int id = 0;
31 typename T::value_type;
32 {fieldDef.getFieldName()} -> std::convertible_to<std::string_view>;
33 {fieldDef.getFieldID()} -> std::integral;
42template<FieldValueType T>
47 template<geometry::AnyGeometry G>
50 std::string fieldName;
54 constexpr explicit FieldDefinition(std::string fieldName,
int id) : fieldName(
std::move(fieldName)), fieldID(id) {}
59 [[nodiscard]]
constexpr const std::string &
getFieldName() const noexcept {
60 return this->fieldName;
63 [[nodiscard]]
constexpr int getFieldID() const noexcept {
67 template<FieldValueType U>
69 return this->fieldID == other.getFieldID();
74namespace fishnet::__impl {
75template<
typename Variant>
76struct FieldDefinitionTypes;
78template<
typename... Types>
79struct FieldDefinitionTypes<
std::variant<Types...>> {
80 using type = std::variant<FieldDefinition<Types>...>;
Definition FieldDefinition.hpp:10
Definition FieldDefinition.hpp:14
static int operator()() noexcept
Definition FieldDefinition.hpp:19
Field definition implementation. Defines name, id and data type of a field.
Definition FieldDefinition.hpp:43
constexpr bool operator==(const FieldDefinition< U > &other) const noexcept
Definition FieldDefinition.hpp:68
constexpr int getFieldID() const noexcept
Definition FieldDefinition.hpp:63
constexpr const std::string & getFieldName() const noexcept
Definition FieldDefinition.hpp:59
T value_type
Definition FieldDefinition.hpp:57
Stores the geometries, wrapped in features (which hold the field values / attributes) Keeps track of ...
Definition VectorLayer.hpp:28
Definition FieldType.hpp:10
Defines an Interface for FieldDefinitions, which can be used as generic parameter.
Definition FieldDefinition.hpp:30
Definition BFSClustering.hpp:5
fishnet::__impl::FieldDefinitionTypes< FieldType >::type FieldDefinitionVariant
Definition FieldDefinition.hpp:85