X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=FD4Be3iZNQbrKD7ft0jRmEmmGJ2Yk1WNLbcdjE7zcik=; b=iFelCETEZm9WPRgetcGsKZzTVpTVtZ2VuULyWe7gsFk8+ZzlMk0sogOvJBMjRPsR73 Q7X0C7swjpIcPf4qoUei8whKO8nQue6zZ4D0jOte41Yv8E88BzJvx2WaY8AcTr/7/Zxq yZu0BDx866a4tETXKYF38ZEfD3HuHvOF8iC/AWJRCw4+COmD60bXFsGIjrMS5M8PlYFu +hBKHwgPtIiL3ZcB5aQUrh5mJjjGVCr8VZrjNzklN8uYYCNLemOZBuODr4oC4yAdF/Ei QHCD9cIQRioAhIKdMzc0Yj2GjSmN9IoH4QlAfyj3WwXw0XF4E7KmeVRxiIGUaTISEqfA kxTg== MIME-Version: 1.0 X-Received: by 10.202.201.77 with SMTP id z74mr88515379oif.24.1452463132014; Sun, 10 Jan 2016 13:58:52 -0800 (PST) In-Reply-To: <5692CBD5.3020101@prochac.sk> References: <5692CBD5 DOT 3020101 AT prochac DOT sk> Date: Sun, 10 Jan 2016 21:58:51 +0000 Message-ID: Subject: Re: [geda-user] A new PCB file format - modular system From: "Peter Clifton (petercjclifton AT googlemail DOT com) [via geda-user AT delorie DOT com]" To: gEDA User Mailing List Content-Type: multipart/alternative; boundary=001a1134f920087ec4052901edfd 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 --001a1134f920087ec4052901edfd Content-Type: text/plain; charset=UTF-8 Hi Milan, That is a surprisingly small patch! Did you have some of your example format readers / writers to share too? Peter On 10 January 2016 at 21:23, Milan Prochac (milan AT prochac DOT sk) [via geda-user AT delorie DOT com] wrote: > After reading long discussions about the new PCB file format I tried to > implement support for multiple file formats. > > You can download it here: > http://static.bastl.sk/pcb/Modular-file-formats.gz It is also available > on launchpad: https://bugs.launchpad.net/pcb/+bug/1532611 > > The patch implements modular system to support multiple PCB file formats. > Attached is also the template of the file-format plugin with instructions. > > The patch is not too big, but it touches various parts of PCB, so it is > possible that some corner cases are not handled properly. Comments and bug > reports are welcome. > > The modular system utilizes existing plugin system; new type of plugin is > added to support various file formats. This approach allows implementation > of additional file formats as independent shared library with minimal > effort. The whole implementation of new file format is reduced to > serialization and de-serialization of PCBType data structure, no PCB > tweaking is necessary. The template with instructions is provided, as > mentioned above. > > - modular system is available for all layout operations (Load, Save, Save > As, Load to buffer, Revert, auto-backup); the element operations will be > added later. > - action "SaveTo(LayoutAs..." was extended by 3rd argument, specifying > file format; if omitted, current (or default) format is used > - GUI (GTK only at the moment) was adjusted to allow select file format; > for "save" operations it specifies desired format, for "open" operations it > is used as filter > - file format is detected automatically by modular framework > - the versioning system (based on PCB file version #defines) is available > - each plugin should confirm it's capability to save data of required > version (like 20110603); if not, the file format cannot be used > - load-only and save-only formats are supported. If save-only format is > used, the layout is not marked as "saved". > - the current PCB format is converted to built-in plugin. > > With this enhancement it should be very easy to implement new file > formats. If more of them will be available, the most successful can become > new standard PCB format and - hopefully - the data model modifications > will be not blocked by hard-to-extend file format anymore... > > Regards > Milan > --001a1134f920087ec4052901edfd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Milan,

That is a surprising= ly small patch!

Did you have some of your example format reade= rs / writers to share too?


Peter

On 10 January 2016 at 21:23, Mila= n Prochac (milan AT prochac DOT sk) [via <= a href=3D"mailto:geda-user AT delorie DOT com">geda-user AT delorie DOT com] <ge= da-user AT delorie DOT com> wrote:
After reading long discussions about the new PCB file format I tried to im= plement support for multiple file=C2=A0 formats.

You can download it here: http://static.bastl.sk/p= cb/Modular-file-formats.gz It is also available on launchpad: https://bugs.launchpad.net/pcb/+bug/1532611

The patch implements modular system to support multiple PCB file formats. A= ttached is also the template of the file-format plugin with instructions.
The patch is not too big, but it touches various parts of PCB, so it is pos= sible that some corner cases are not handled properly. Comments and bug rep= orts are welcome.

The modular system utilizes existing plugin system; new type of plugin is a= dded to support various file formats. This approach allows implementation o= f additional file formats as independent shared library with minimal effort= . The whole implementation of new file format is reduced to serialization a= nd de-serialization of PCBType data structure, no PCB tweaking is necessary= . The template with instructions is provided, as mentioned above.

- modular system is available for all layout operations (Load, Save, Save A= s, Load to buffer, Revert, auto-backup); the element operations will be add= ed later.
- action "SaveTo(LayoutAs..." was extended by 3rd argument, speci= fying file format; if omitted, current (or default) format is used
- GUI (GTK only at the moment) was adjusted to allow select file format; fo= r "save" operations it specifies desired format, for "open&q= uot; operations it is used as filter
- file format is detected automatically by modular framework
- the versioning system (based on PCB file version #defines) is available -= each plugin should confirm it's capability to save data of required ve= rsion (like 20110603); if not, the file format cannot be used
- load-only and save-only formats are supported. If save-only format is use= d, the layout is not marked as "saved".
- the current PCB format is converted to built-in plugin.

With this enhancement it should be very easy to implement new file formats.= If more of them will be available, the most successful can become new stan= dard PCB format and - hopefully -=C2=A0 the data model modifications will b= e not blocked by hard-to-extend file format anymore...

Regards
Milan

--001a1134f920087ec4052901edfd--