Re: [Gegl-developer] New serialization format



Michael Muré <batolettre gmail com> wrote:
Let's roll the ball a bit further.

http://pastebin.com/4ZkPRz43

Here is another try, with XML this time. In the process, I corrected some
flaws that was present in the YAML and JSON test:
* the output node is mentioned explicitly. It was implicit before, the
output node being the root of the tree.
* parameters and connection are separated by different tags, not just by
name
* operation's ID and pad are separated when describing a connection, so no
need to parse, and each can have ':' in their names

The different kind of parameters we can have:
- boolean
- int
- double
- string
- enumeration
- GeglColor (serialization defined in gegl-color.c)
- GeglCurve (no serialization format defined)
- GeglPath (serialization defined in gegl-path.c

Is this better ?

  Looks ok to me. One thing i would do: Leave out the 'out' attribute
  of the root node (which probably should designate the root of the
  graph). It does not really fit to the rest of the file. The XML
  describes completely what the graph looks like already. The 'out'
  attribute seems to be different; it seems to describe how to USE the
  graph instead of how it looks. But for this a single attribute is
  not enough anyway. For example, i sometimes use gegl for splitting
  an image into the channels R, G and B, so i have three root nodes,
  so there would be no useful single attribute to use as a root. And
  because i do not have a better idea at hand for how this should be
  included in a serialized format (if it should be included at all),
  i would leave it out.

  wbr - Rasmus
  

-- 
Michael



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]