[m5-dev] Packet/Request

2008-11-06 Thread nathan binkert
So, Packet and Request have lots of functions called getFoo and setFoo. That sort of style has always annoyed me because it requires a lot of extra typing and space. e.g. /// Accessor function for the destination index of the packet. short getDest() const { assert(destValid); return

Re: [m5-dev] Packet/Request

2008-11-06 Thread Steve Reinhardt
What's the convention in other objects? I'm fine with either approach (though I lean toward what Nate is suggesting); as with most style things, I'm more concerned with consistency than anything else. I'd be OK with this if it's part of a trend toward doing accessors in this style globally (in

Re: [m5-dev] Packet/Request

2008-11-06 Thread Ali Saidi
I'm fine with it shifting to this method Too bad that C++ doesn't have Objective-C like properties. Ali On Nov 6, 2008, at 2:10 PM, Steve Reinhardt wrote: What's the convention in other objects? I'm fine with either approach (though I lean toward what Nate is suggesting); as with most

Re: [m5-dev] Packet/Request

2008-11-06 Thread Lisa Hsu
I prefer Nate's way too - members be _member, and accessor be member(). I half did this with my contextId()/cpuId()/threadId() changes just now. my set functions were still prepended with set though, didn't think of overloading. Anyway, point is, I'm down. Lisa On Thu, Nov 6, 2008 at 2:16 PM,