Wondering about the purpose to announce ObservableSettings following Singleton

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Wondering about the purpose to announce ObservableSettings following Singleton

Schmidt
Hi all developers of Quantlib
My name is Schmidt, and I'm working for an Asia local bank. I just stepped into studying Quantlib for weeks. and now having a question about Class ObservableSettings. I'm wondering the purpose to announce it following Singleton pattern. Is it because that we'll only have market-data type variables to be observable, then all these market-data must apply the same Enable & Deferred updates settings. Cos now I'm thinking about if I have two types of variable observable, and I want them to be under different ObservableSettings, it seems can't be applicable with ObeservableSettings' Singleton pattern right?
Reply | Threaded
Open this post in threaded view
|

Re: Wondering about the purpose to announce ObservableSettings following Singleton

Luigi Ballabio
Right, coding it as a singleton makes it a global setting.  If you wanted two groups, you'd have to change the patters (and also to find a way to assign each observable to one of the two groups).

Luigi


On Sat, Mar 26, 2016 at 12:19 PM Schmidt <[hidden email]> wrote:
Hi all developers of Quantlib
My name is Schmidt, and I'm working for an Asia local bank. I just stepped
into studying Quantlib for weeks. and now having a question about Class
ObservableSettings. I'm wondering the purpose to announce it following
Singleton pattern. Is it because that we'll only have market-data type
variables to be observable, then all these market-data must apply the same
Enable & Deferred updates settings. Cos now I'm thinking about if I have two
types of variable observable, and I want them to be under different
ObservableSettings, it seems can't be applicable with ObeservableSettings'
Singleton pattern right?




--
View this message in context: http://quantlib.10058.n7.nabble.com/Wondering-about-the-purpose-to-announce-ObservableSettings-following-Singleton-tp17359.html
Sent from the quantlib-dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev