Login  Register

Re: Users of TDependencyQueries

Posted by Anne Etien on Oct 10, 2017; 1:45pm
URL: https://forum.world.st/Users-of-TDependencyQueries-tp4980643p4980648.html


> Le 10 oct. 2017 à 15:36, Cyril Ferlicot <[hidden email]> a écrit :
>
> Hi,
>
> Currently Moose-Query works with Traits.
>
> There is :
> - TDependencyQueries containing all the query system and the common
> queries such as #queryIncomingAccesses
> - TOODependencyQueries using TDependencyQueries and adding the method
> specific to OO entities (mostly inheritance queries)
>
> The users of TDependencyQueries are:
> - TOODependencyQueries
> - FAMIXAnnotationInstance
> - FAMIXAnnotationInstanceAttribute
> - FAMIXSourceAnchor
>
> The users of TOODependencyQueries are:
> - FAMIXNamedEntity
>
> I think it would make sense to move TDependencyQueries to FAMIXEntity.

No, it does not make sense.
By putting TOODependencyQueries to FAMIXNamedEntity and not FAMIXEntity, the idea was to query only non association entity. It was the only way to do it.
If you look at the users of TDependencyQueries, it is all the non association entity that have no name.

If you do the change you suggest, you will be able to ask queryAllIncomingAssociations on a FAMIXInvocation, what makes no sense.

So the only way to do it is to say that the entity should not inherits from FAMIXAssociation.

Anne

> FAMIXEntity has all the API needed to the queries and it would help
> with the consistancy. For example I think that all famix entities
> should be able to answer to "queryAllIncomingAssociations". It would
> felp making more generic tools.
>
> What do you think? Does that bother someone?
>
> --
> Cyril Ferlicot
> https://ferlicot.fr
>
> http://www.synectique.eu
> 2 rue Jacques Prévert 01,
> 59650 Villeneuve d'ascq France
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev