fgerlits commented on code in PR #1589:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1589#discussion_r1265631311
##########
libminifi/src/core/Property.cpp:
##########
@@ -90,4 +94,41 @@ std::vector<std::pair<std::string, std::string>>
Property::getExclusiveOfPropert
return exclusive_of_properties_;
}
+namespace {
+std::vector<PropertyValue> createPropertyValues(gsl::span<const
std::string_view> values, const core::PropertyParser& property_parser) {
+ return ranges::views::transform(values, [&property_parser](const auto&
value) {
+ return property_parser.parse(value);
+ }) | ranges::to<std::vector>;
+}
+
+inline std::vector<std::string> createStrings(gsl::span<const
std::string_view> string_views) {
+ return ranges::views::transform(string_views, [](const auto& string_view) {
return std::string{string_view}; })
+ | ranges::to<std::vector>;
+}
+
+inline std::vector<std::pair<std::string, std::string>>
createStrings(gsl::span<const std::pair<std::string_view, std::string_view>>
pairs_of_string_views) {
+ return ranges::views::transform(pairs_of_string_views, [](const auto&
pair_of_string_views) { return std::pair<std::string,
std::string>(pair_of_string_views); })
+ | ranges::to<std::vector>;
+}
+} // namespace
+
+Property::Property(const PropertyReference& compile_time_property)
+ : name_(compile_time_property.name),
+ description_(compile_time_property.description),
+ is_required_(compile_time_property.is_required),
+ valid_regex_(compile_time_property.valid_regex),
Review Comment:
removed in 9ab589d0021d742d2963d910875cd9b6611b6bc2
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]