- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to know all possibilities to access components of an extended type via a class pointer of a more generalized type. I.E. if i have a type A and a type Aext which extends A, how can I access a component only present in Aext via a class (A) pointer?
So far, the only way I found is a SELECT TYPE construct. While this works, it does addquite alot of code and also seems to be performing very poorly.
Is that the only way to accessspecialized componentsor are there any other possibilities I did not find?
regards,
Thomas
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To my knowledge, SELECT TYPE is indeed the only way to access components of an extended type. This is by design. The performance of the construct may to some extent be an implementation issue (for ifort, 11.1 is the first release at all to support SELECT TYPE), but of course it is not recommended to execute the statement in a block enclosed by a loop nest which dominates execution time.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To my knowledge, SELECT TYPE is indeed the only way to access components of an extended type. This is by design. The performance of the construct may to some extent be an implementation issue (for ifort, 11.1 is the first release at all to support SELECT TYPE), but of course it is not recommended to execute the statement in a block enclosed by a loop nest which dominates execution time.
![](/skins/images/3CECF0550DB8BF54496C114A1FF06FE9/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page