Re: [frogs] Changing subproperties with grob-set-property (working on bug #40) |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: frogs@xxxxxxxxxxx, Neil Puttock <n.puttock@xxxxxxxxx>
- Subject: Re: [frogs] Changing subproperties with grob-set-property (working on bug #40)
- From: Marc Hohl <marc@xxxxxxxxxx>
- Date: Sun, 01 Nov 2009 21:25:38 +0100
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1257107145; l=1439; s=domk; d=hohlart.de; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Subject:To:MIME-Version:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=ulAWjAERgfwAeXC0c8rY/I4olz8=; b=MkKJ4jEOElvJPex2BGoIbDUSzdLpGhDurZmSd63QWa3SbgzotUX5S/z5JgWmKhVIRSS khQ5avUjA8LTd9jUz8MN+ZD7t+4fAkF62GCO1/9Y2HCoBo/hZG/iFFfVMe0hg2XJiUPZt h7uHRDzOwJ8bvcuKiCKME7RVzKCTbEEjzUI=
Marc Hohl schrieb:
Neil Puttock schrieb:
[...]
2) create a new exported function ly_grob_set_nested_property_x ()
I favour the latter, since it's cleaner to implement: if you amend
ly:grob-set-property! you'll have to use a hybrid type check, since
the property path could be either a symbol or list.
Ok, I will have a look at the code. I am sure that questions will arise,
because c++ is new for me, but nevertheless ...
Staring at the code, I get a faint impression that it would be more
difficult than I expected.
But there is a file lily/nested-property.cc. Are there some functions
that would do the job or
at least something similar to it?
At the moment, I think I understood the meaning of the arguments to
LY_DEFINE:
First comes the c++ name of the function, then the name used in scheme,
then the number of required arguments, the number of optional arguments,
then a zero (?? at least in every function I looked at), then a list of
arguments (...)
and the docstring.
So the header of the definition could be
LY_DEFINE (ly_grob_set_nested_property_x, "ly:grob-set-nested-property!",
3, 0, 0, (SCM grob, SCM symlist, SCM val),
"Set nested property @var{symlist} in grob @var{grob} to value
@var{val}.")
{
Grob *sc = unsmob_grob (grob);
LY_ASSERT_SMOB (Grob, grob, 1);
LY_ASSERT_TYPE (ly_is_list, symlist, 2);
But that's more or less a guess...
Marc
---
----
Join the Frogs!