X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Message-ID: <20150901095807.17257.qmail@stuge.se> Date: Tue, 1 Sep 2015 11:58:07 +0200 From: "Peter Stuge (peter AT stuge DOT se) [via geda-user AT delorie DOT com]" To: geda-user AT delorie DOT com Subject: Re: [geda-user] SQL PCB file format Mail-Followup-To: geda-user AT delorie DOT com References: <20150826000523 DOT 353 DOT qmail AT stuge DOT se> <55DDD4DB DOT 2060008 AT ecosensory DOT com> <20150826153031 DOT 4620 DOT qmail AT stuge DOT se> <201508261807 DOT t7QI7sS3003191 AT envy DOT delorie DOT com> <20150826182552 DOT 22702 DOT qmail AT stuge DOT se> <20150831140133 DOT 2dc0456c28430ebcfb0b17b5 AT gmail DOT com> <55E4471F DOT 3010906 AT jump-ing DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Kai-Martin Knaak wrote: > >> read through source code and find all functions or similar > >> accessing the PCB file and put them in libpcb library file which > >> would be become a storage library. > > > > Pretty much all code accesses the stored data directly, no such > > thing like accessors or setters/getters. > > Something whispers "refactor!" in my ear... Setters/getters are perhaps the worst side effect there is in source code. Never introduce artificial overhead without very careful consideration. Data structures in memory are intended to be accessed directly and ideally never copied. Permanent storage is another matter. Setters/getters for files are all the more appropriate - and that's exactly what libpcb and edacore both would offer. I'm all for moving pcb file code into a libpcb. //Peter