From: John M. <joh...@gm...> - 2012-06-17 16:33:41
|
> I hesitate to make the alredy complex hierarchy more so. Agreed, also with everything Egon said but I'll respond to that also. > What about moving get2DCenter to some superclass? The trouble is what about the chem objects which don't have coordinates. A big question I had was what would be the function of get2DCentre() on IAtom? Besides that it is possible to do the following with little impact to the concrete classes (gave my own name the interface). public interface ICartesianChemObject extends IChemObject { public Point2D getPoint2D(); public Point2D getCentre2D(); public Point3D getPoint3D(); // etc... } It's then possible to aggregate the functionality at the interface level. public interface IAtom extends IAtomType, ICartesianChemObject { } public interface IBond extends IElectronContainer, ICartesianChemObject { } Cheers, J On 17 Jun 2012, at 16:21, Rajarshi Guha wrote: > I hesitate to make the alredy complex hierarchy more so. > > What about moving get2DCenter to some superclass? > > On Sun, Jun 17, 2012 at 4:49 AM, <ra...@ar...> wrote: > Hello, > I propose to add a class to the IChemObject hierarchy to > the effect that IElement and IElectronContainer (and maybe > IAtomContainer) have a superclass below IChemObject, making > it possible to call get2DCenter() on both IBond and IAtom > (and others too) when that method will be moved to that interface. > > Reason: it's a natural; also, there are situations any > selected object is wanted regardless of Atom/Bond. > > Possible names coming to mind are > o IObjectWith2DCenter > o IPositionableObject > o IObjectInArea > o IObjectInSpace > > Opinions? What about arrows? > > > Regards, > ralf > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cdk-devel mailing list > Cdk...@li... > https://lists.sourceforge.net/lists/listinfo/cdk-devel > > > > -- > Rajarshi Guha | http://blog.rguha.net > NIH Center for Advancing Translational Science > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________ > Cdk-devel mailing list > Cdk...@li... > https://lists.sourceforge.net/lists/listinfo/cdk-devel |