Re: [Consmgr-tech] UDSListener::set_addr()
Status: Alpha
Brought to you by:
cross
|
From: Geoff A. <gsa...@av...> - 2008-04-02 22:04:05
|
On 2 Apr 2008, at 8:34 AM, Chris Ross wrote: > Hey there. It looks like you changed UDSListener::set_addr() to > modify its inherited addr member directly, rather than call > SockConn::set_addr(). I thought we had stated earlier that we > shouldn't modify inherited members, and that there should be methods > for doing such in the class that owns the data member? SockListener > has set_addr() methods. > > Clearly, the model of coding is a little unclear somewhere. I > swear we specifically said that there should be accessor methods for > things that were members in superclasses.... Well, whether we said it or not, I tend to agree with that philosophy. (I believe we did discuss using accessors to get at things in *other* classes--particularly those classes that you compose into yourself as a way of having their functionality--which is a little different, but the same certainly applies to super/subclasses. So, I'm with you here.) I was in the middle of a lot of changes to these classes, and didn't really finish it. This defect is, in particular, probably related to the fact that much of this code was split out of SockConn, the Socket Connector (which I kinda feel like we should rename that way for clarity; just not the file names), which shouldn't actually know anything about addresses. So, I was in the middle of moving the address-specific stuff into SockConn's subclasses, and SocketListener probably inherited some of that change. Please fix this if you get the chance. Thanks, - Geoff |