Name: Anonymous 2013-04-29 9:58
Hi
I have a structure like that
AtributeList
|
+-- Atribute
+-- Atribute
+-- Atribute
That is, an object that handles many Atribute inside. But i made it so Atribute can also contain another AtributeList.
What's a good way of checking for circular references (That is, one atribute contains an AtributeList that is its ancestor), besides, of course, brute force checking of each ancestor.
I have a structure like that
AtributeList
|
+-- Atribute
+-- Atribute
+-- Atribute
That is, an object that handles many Atribute inside. But i made it so Atribute can also contain another AtributeList.
What's a good way of checking for circular references (That is, one atribute contains an AtributeList that is its ancestor), besides, of course, brute force checking of each ancestor.