- Joined
- Mar 7, 2011
- Messages
- 124
I want to have two structs that look like
how do I design them so that JASSHelper doesn't complain? My actual setup is more complicated, with a few more classes having 0-many children with 1 parent, but the basic idea applies. I need to depth first search to find a single child, and then I want to be able to look up the parent chain from that child
my only idea so far sucks: consolidating all the classes into a single one, adding a property to specify the generic classes specific type, and implementing the original differences between them as very complex switch statements around that type
Code:
library Foo
struct B
public Foo_A parent
endstruct
struct A
public B array children
endstruct
endlibrary
how do I design them so that JASSHelper doesn't complain? My actual setup is more complicated, with a few more classes having 0-many children with 1 parent, but the basic idea applies. I need to depth first search to find a single child, and then I want to be able to look up the parent chain from that child
my only idea so far sucks: consolidating all the classes into a single one, adding a property to specify the generic classes specific type, and implementing the original differences between them as very complex switch statements around that type
Last edited: