chapter10 page158about a sentence

This forum is to discuss the book "C++ design patterns and derivatives pricing."

chapter10 page158about a sentence

Postby DavidZhou » Fri Nov 14, 2014 3:03 am

page 158 there is a sentence: if we define a class in such a way that initializing a global variable of that class registers a pay-off class with the factory.does that mean:define PayOffHelper<T> in such a way that initializing a global variable (theFactory) of that class(PayOffFactory) registers a payoff class with the factory(a global variable)?
thanks a million for your replying!
DavidZhou
 
Posts: 3
Joined: Sat Aug 09, 2014 12:04 pm
Location: Mainland China

Re: chapter10 page158about a sentence

Postby mj » Fri Nov 14, 2014 4:40 am

PayOffHelper<T> is the class for which a global variable is being declared. Its constructor registers the class with the factory which is a singleton object rather than a global variable.
mj
Site Admin
 
Posts: 1380
Joined: Fri Jul 27, 2007 7:21 am


Return to C++ design patterns and derivatives pricing

Who is online

Users browsing this forum: No registered users and 1 guest

cron