Jump to content
Mr. hamid reza

passing value and object between features

Recommended Posts

Hello all,

Is there any way to pass the output of the feature as input of some other features, without repetitive run of the referred one?

 

For example:

I am trying to run my algorithm as shown in the attached figure. At first the FeatureNo1 ran to get some inputs and calculate some values and objects. Then these value and objects have to pass to FeaturesNo2, FeaturesNo3, FeaturesNo4.   For completing my process, I need to run all the Ffeaures.

 

I don’t want to combine all the features in one, because it will be so unclassified and difficult for tracing and development. So, I used the nested feature option and call the output of featureNO1 inside of each mentioned features (No2 to No4), then the features would be run in following order.

 

fp_ FeaturesNo2 no2()

no2.run()

Fp_FeaturesNo3 no3()

no3.run()

Fp_FeaturesNo4 no4()

no4.run()

 

Therefore, the FeatureNo1 run three times, because each feature calls the output of NO1 separately. So, is there any idea to escape of this repetition?

 

Best Regards

Hamidreza

 

 

 

 

post-466-0-05591300-1497974841_thumb.png

Share this post


Link to post
Share on other sites

Hi Hamidreza,

 

You could create an instance of FeatureNo1 in your project and pass it as argument to 2, 3 and 4. Once it is up to date it would not run again.

Simply create an argument of type FFeature::FeatureNo1 in 2, 3 and 4.

 

Best regards,

Stefan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...