[Clam-devel] [PATCH] TonalAnalysis configuration, take two

David García Garzón dgarcia at iua.upf.edu
Thu Jul 12 08:19:31 PDT 2007


I do like Qt way which enables both languages.

void enableThis(bool enabled=true)
{
	_this=enabled;
}
void disableThis()
{
	enableThis(false)
}

The second method is provided just for convenience.  Do not provide it if you 
are not using it at all.


On Thursday 12 July 2007 16:13:44 Roman Goj wrote:
> Hi!
>
> Sending the first in a new series (hopefully) of tiny patches adding
> configuration to TonalAnalysis. First for _tunningEnabled (member of
> Simac::ChordExtractor)...
>
> In short this patch:
> * Adds configuration for TonalAnalysis - _tunningEnabled is configurable
> * Adds _tunningEnabled accessors in Simac::ChordExtractor
>
> but, of course, a question:
> I wrote the accessors enableTunning() and disableTunning() is this the
> way to go or rather enableTunning(bool) ? I think I like the second
> idea more, maybe more confusing if to disable tunning one would write
> enableTunning(false). The second option would allow this code:
>
> _implementation->enableTunning ( _config.GetTunningEnabled() )
>
> instead of this:
> if(_config.GetTunningEnabled())
>         _implementation->enableTunning();
> else
>         _implementation->disableTunning();
>
> is there a convention adopted in CLAM for doing this type of accessors?
>
> cheers,
> roman
>
> PS, spent something like 5 hours yesterday battling with conflicting
> sandboxes (couldn't even force the code to print Hello World ;) ),
> what should've taken me 5 minutes took more then those 5 hours...
> finally I have just one sandbox and so far so good...






More information about the clam-devel mailing list