Re: Updating a View component about indexed parameter states
Re: Updating a View component about indexed parameter states
- Subject: Re: Updating a View component about indexed parameter states
- From: Brian Willoughby <email@hidden>
- Date: Mon, 7 Nov 2005 13:48:59 -0800
Andrew Kimpton wrote:
[ I can see two ways of looking at this - but it'd be really nice if
[ the copy constructors actually called the private Init() method so
[ that this was easier to do. I know this leads to questions of 'copy
[ as it was' vs 'copy as it is', or a 're-init' mechanism would help too.
I disagree with your first suggestion. In the object world, copy and init are
distinct entry points, and if one method called the other then there might be
a loop in certain subclassing situations. It is better, when necessary, to
create a third private method which puts the object in a usable state after
some change to the variables. copy and init could each call this _updateState
method. Plus, this would offer the opportunity to segregate initialization of
variables to defaults versus adjusting the operating state to any new values.
Brian Willoughby
Sound Consulting
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden