• 1 reply
  • Latest Post - ‏2013-08-09T04:25:26Z by JeanZ
4 Posts

Pinned topic Loop through associations

‏2013-07-04T11:27:50Z | associations



I have a base class which has a directed association with multiple other classes, i.e. the base struct consists of pointers to other classes. What I would like to do is programatically loop through all the pointers.

One way to achieve this would be to have these pointers stored in an array or some sort of a container. Is it possible to change the association's properties in a way  that the generated code stores the pointer to the class to a predefined container instead of directly to the associated struct? 

I am using Rhapsody in C.


Thanks for any suggestions,


Updated on 2013-07-04T12:33:21Z at 2013-07-04T12:33:21Z by urossec_ie4000
  • JeanZ
    312 Posts

    Re: Loop through associations


    In RiC, class in model would be mapped as struct in code by default.

    You probably could paste the code here that you are expecting to be generated.

    By the way, have you tried C_CG::Class::InstanceDeclaration property, removing the "struct" from the default value.