Jump to content
Mr. Bram1 Kerkhofs1

Objectlist cast to self-made Feature definition

Recommended Posts

Hi there

 

When I construct a fobjectlist which contains my own defined FeatureDef's, I can't (don't know how to) cast them to the FeatureDef when I want to retrieve the item.
The name of my FeatureDef is "CurveFunctions". I tried following:
 

fp_curvefunctions dd(MyList.at(0).CastTo( FFeature::CurveFunctions )
fp_curvefunctions dd(MyList.at(0).CastTo( FCurveFunctions )
fp_curvefunctions dd(MyList.at(0).CastTo( fp_CurveFunctions )
 

but none of them work

 

Does anyone know what the correct way of casting is?

 

Thanks

 

Kind regards

Bram

Share this post


Link to post
Share on other sites

Hi Bram,

 

using the typename (F3DPoint, FFeature::...) will create a reference (a different name and optionally a casted type) to an existing object like:

 

point p(1,2,3)

F3DPoint myRefPoint(p)

 

// myRefPoint is p

 

same for features:

fp_... f(...)

FFeature::... myRefFeature(f)

 

Cheers,

Stefan

  • Upvote 1

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