jamoma / jamoma2

A header-only C++ library for building dynamic and reflexive systems with an emphasis on audio and media.
MIT License
30 stars 6 forks source link

Read-Only Parameter Implementation #84

Open tap opened 8 years ago

tap commented 8 years ago

We have a need for Parameters that are Read-Only. For example, if we have some object that is doing mem allocation (lookahead buffer in the limiter, padding adjustment on a buffer, etc.) it should be fixed at the time that the object is instantiated.

These Parameters need to be settable in the ctor, e.g. by passing in N pairs of name and value. After that they should only be gettable.

We will also need a way to flag this readonly with a template parameter (so writing to it can be caught at compile time).