From: Egon W. <el...@ca...> - 2003-02-27 13:49:43
|
-------------------------------------------------------------------------- RFC CDK #13 Name: use of get/setFlag and get/setPointer in ChemObject Proposed: 2003-02-27 PROPOSAL The implementation of public get/setFlag and get/setPointer method deprecating the direct use of the of the flags[] and pointer[] arrays. The API for these methods is proposed to be: public void setFlag(int flag_type, boolean flag_value); public boolean getFlag(int flag_type) public void setPointer(int pointer_type, Vector pointer_value); public boolean getPointer(int pointer_type) This proposal deliberately does not propose how to implement these methods, allowing alternative and parallel implementations. REASON At this moment it is not possible to define an interface some ChemObject may need to implement (read interface Atom, see RFC #8) which includes the access to the fields in ChemObject. More specifically, ChemObject currently uses direct access to its flags[] field, which cannot be defined in the interface, which results in the need to cast classes extending ChemObject to ChemObject before the field can be accessed. In addition to this, use of the get/set method may improve CDK performance considerably (see discussion on cdk-devel@ in 2003-02: http://sourceforge.net/mailarchive/forum.php?forum_id=2178&max_rows=25&style=ultimate&viewmonth=200302). -------------------------------------------------------------------------- |