Hi Francis,

Typically you access attributes by passing either their full path, or
their path relative to another quark. So you should technically always
know its direct parent, no? ;)

If you have a particular use case where you'd want to get the parent
from a child, well right now the interface does not provide it, but you
could add a getter for internal.tmf.core.statesystem.Attribute#parent,
then expose it through AttributeTree, then through StateSystem. It
should always exist, except if the attribute is the root node of the
tree, in which case it would be null.

Hope this helps,
Alex


On 14-03-24 06:48 PM, Francis Giraldeau wrote:
> I would like to know if it is possible to query the get the parent quark of
> a given quark? Here is an example of usage:
>
> ITmfStateSystemBuilder ss;
> ss.getSubAttributes(quark); // get children, exists
> ss.getParentAttributes(quark); // get parent, does not exist?
>
> Thanks!
>
> Francis
>
>
_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev

Reply via email to