[ 
https://issues.apache.org/jira/browse/MINIFICPP-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ferenc Gerlits updated MINIFICPP-1728:
--------------------------------------
    Description: 
We have a lot of parallel versions of {{getProperty}} and {{setProperty}}, some 
of which take a (reference to) a Property object, some take a string (the name 
of the property).  If possible, it would be good to get rid of all the string 
versions.  It should be possible to at least get rid of most of them.

Also, the various {{setProperty}} functions take their {{value}} parameter by 
value, but don't move from them.  The compiler probably eliminates most of 
these copies, but we shouldn't rely on that.  The parameter type could be 
changed to either {{const std::string&}} or {{string_view}}.

  was:
We have a lot of parallel versions of {{getProperty}} and {{{}setProperty{}}}, 
some of which take a (reference to) a Property object, some take a string (the 
name of the property).

If possible, it would be good to get rid of all the string versions.  It should 
be possible to at least get rid of most of them.


> Clean up getProperty/setProperty in ProcessContext etc
> ------------------------------------------------------
>
>                 Key: MINIFICPP-1728
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-1728
>             Project: Apache NiFi MiNiFi C++
>          Issue Type: Improvement
>            Reporter: Ferenc Gerlits
>            Priority: Minor
>              Labels: MiNiFi-CPP-Hygiene
>
> We have a lot of parallel versions of {{getProperty}} and {{setProperty}}, 
> some of which take a (reference to) a Property object, some take a string 
> (the name of the property).  If possible, it would be good to get rid of all 
> the string versions.  It should be possible to at least get rid of most of 
> them.
> Also, the various {{setProperty}} functions take their {{value}} parameter by 
> value, but don't move from them.  The compiler probably eliminates most of 
> these copies, but we shouldn't rely on that.  The parameter type could be 
> changed to either {{const std::string&}} or {{string_view}}.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to