fgerlits commented on code in PR #1589:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1589#discussion_r1265144838


##########
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:
   You're right, it isn't used.  We do include it in `AgentInformation.h` as 
`validRegex` (although I can't see it in the manifest, which is confusing, but 
there is a unit test for it).  Should I remove it from there, too, or should we 
keep it as an always-empty string, as it is now?



-- 
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]

Reply via email to